destinator.cc
dg-100.cc
dmtlog.cc
- easygps.cc
- energympro.cc
- enigma.cc
exif.cc
f90g_track.cc
garmin_fit.cc
csv_util.h
defs.h
dg-100.h
- energympro.h
exif.h
explorist_ini.h
f90g_track.h
destinator.cc \
dg-100.cc \
dmtlog.cc \
- easygps.cc \
- energympro.cc \
- enigma.cc \
exif.cc \
f90g_track.cc \
garmin_fit.cc \
csv_util.h \
defs.h \
dg-100.h \
- energympro.h \
exif.h \
explorist_ini.h \
f90g_track.h \
--- /dev/null
+/*
+ Access to EasyGPS files.
+
+ Copyright (C) 2003 Robert Lipe, robertlipe+source@gpsbabel.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+
+#include "defs.h"
+#include <cstdio>
+
+static gbfile* file_in;
+static gbfile* file_out;
+static short_handle mkshort_handle;
+/* static char *deficon = NULL; */
+
+#define MYNAME "EasyGPS"
+
+static
+QVector<arglist_t> easygps_args = {
+ /* {"deficon", &deficon, "Default icon name", "Waypoint",
+ ARGTYPE_STRING}, */
+};
+
+static void
+rd_init(const QString& fname)
+{
+ char ibuf[100] = {'0'} ;
+ const char* ezsig = "TerraByte Location File";
+
+ file_in = gbfopen_le(fname, "rb", MYNAME);
+
+ int sz = gbfread(ibuf, 1, 52, file_in);
+
+ if ((sz < 52) ||
+ strncmp(ibuf, ezsig, strlen(ezsig)) != 0 ||
+ (ibuf[51] != 'W')) {
+ fatal(MYNAME ": %s is not an EasyGPS file.\n", qPrintable(fname));
+ }
+}
+
+static void
+rd_deinit()
+{
+ gbfclose(file_in);
+}
+
+static void
+wr_init(const QString& fname)
+{
+ file_out = gbfopen_le(fname, "wb", MYNAME);
+ mkshort_handle = mkshort_new_handle();
+}
+
+static void
+wr_deinit()
+{
+ gbfclose(file_out);
+ mkshort_del_handle(&mkshort_handle);
+}
+
+static void
+data_read()
+{
+ int p;
+ char ibuf[10];
+ do {
+ auto* wpt_tmp = new Waypoint;
+ UrlLink link;
+
+ for (int tag = gbfgetc(file_in); tag != 0xff; tag = gbfgetc(file_in)) {
+ switch (tag) {
+ case 1:
+ wpt_tmp->shortname = gbfgetpstr(file_in);
+ break;
+ case 2:
+ case 3:
+ wpt_tmp->description = gbfgetpstr(file_in);
+ break;
+ case 5:
+ wpt_tmp->notes = gbfgetpstr(file_in);
+ break;
+ case 6: {
+ QString ult = gbfgetpstr(file_in);
+ link.url_link_text_ = ult;
+ }
+ break;
+ case 7: {
+ QString id = gbfgetpstr(file_in);
+ wpt_tmp->icon_descr = id;
+ }
+ break;
+ case 8: /* NULL Terminated (vs. pascal) descr */
+ wpt_tmp->notes = gbfgetcstr(file_in);
+ break;
+ case 9: { /* NULL Terminated (vs. pascal) link */
+ QString url = gbfgetcstr(file_in);
+ link.url_ = url;
+ }
+ break;
+ case 0x10: {
+ QString ult = gbfgetcstr(file_in);
+ link.url_link_text_ = ult;
+ }
+ break;
+ case 0x63:
+ wpt_tmp->latitude = gbfgetdbl(file_in);
+ break;
+ case 0x64:
+ wpt_tmp->longitude = gbfgetdbl(file_in);
+ break;
+ case 0x65:
+ case 0x66:
+ gbfread(ibuf, 8, 1, file_in);
+ break;
+ case 0x84:
+ case 0x85:
+ gbfread(ibuf, 4, 1, file_in);
+ break;
+ case 0x86: /* May be proximity. I think it's time. */
+ gbfread(ibuf, 4, 1, file_in);
+ break;
+ default:
+ printf("Unknown tag %x\n", tag);
+ }
+ }
+ if (!link.url_.isEmpty() || !link.url_link_text_.isEmpty()) {
+ wpt_tmp->AddUrlLink(link);
+ }
+ waypt_add(wpt_tmp);
+ p = gbfgetc(file_in);
+ } while (!gbfeof(file_in) && (p == 'W'));
+}
+
+
+static void
+ez_disp(const Waypoint* wpt)
+{
+ gbfputc('W', file_out);
+ if (!wpt->shortname.isEmpty()) {
+ gbfputc(1, file_out);
+ gbfputpstr(wpt->shortname, file_out);
+ }
+ if (!wpt->description.isEmpty()) {
+ gbfputc(3, file_out);
+ gbfputpstr(wpt->description, file_out);
+ }
+ if (!wpt->icon_descr.isNull()) {
+ gbfputc(7, file_out);
+ gbfputpstr(wpt->icon_descr, file_out);
+ }
+ gbfputc(0x63, file_out);
+ gbfputdbl(wpt->latitude, file_out);
+
+ gbfputc(0x64, file_out);
+ gbfputdbl(wpt->longitude, file_out);
+ if (!wpt->notes.isEmpty()) {
+ gbfputc(5, file_out);
+ gbfputpstr(wpt->notes, file_out);
+ }
+ if (wpt->HasUrlLink()) {
+ UrlLink link = wpt->GetUrlLink();
+ if (!link.url_link_text_.isEmpty()) {
+ gbfputc(6, file_out);
+ gbfputpstr(link.url_link_text_, file_out);
+ }
+ if (!link.url_.isEmpty()) {
+ gbfputc(9, file_out);
+ gbfputcstr(CSTRc(link.url_), file_out);
+ }
+ }
+ gbfputc(0xff, file_out);
+}
+
+static void
+data_write()
+{
+ setshort_length(mkshort_handle, 6);
+
+ gbfprintf(file_out,
+ "TerraByte Location File Copyright 2001 TopoGrafix\n");
+ /*
+ * I don't know what this is.
+ */
+ gbfprintf(file_out, "%c", 0xb);
+
+ waypt_disp_all(ez_disp);
+
+ /*
+ * Files seem to always end in a zero.
+ */
+ gbfputc(0x00, file_out);
+}
+
+
+ff_vecs_t easygps_vecs = {
+ ff_type_file,
+ FF_CAP_RW_WPT,
+ rd_init,
+ wr_init,
+ rd_deinit,
+ wr_deinit,
+ data_read,
+ data_write,
+ nullptr,
+ &easygps_args,
+ CET_CHARSET_ASCII, 0 /* CET REVIEW */
+ , NULL_POS_OPS
+};
--- /dev/null
+/*
+ Handle energympro (GPS training watch) .cpo files
+
+ Copyright (c) 2014 Zingo Andersen zingo@vectrace.com
+ Copyright (C) 2014 Robert Lipe, robertlipe+source@gpsbabel.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ */
+
+#include <cstdint> // for int32_t
+#include <cstdio> // for printf, SEEK_SET, SEEK_CUR, SEEK_END
+
+#include <QDate> // for QDate
+#include <QDateTime> // for QDateTime
+#include <QDebug> // for QDebug
+#include <QString> // for QString
+#include <QTime> // for QTime
+#include <QTimeZone> // for QTimeZone
+#include <Qt> // for UTC
+
+#include "defs.h"
+#include "energympro.h"
+#include "gbfile.h" // for gbfgetc, gbfgetuint16, gbfgetuint32, gbfseek, gbfgetint16, gbfclose, gbfopen, gbfcopyfrom, gbfile, gbsize_t
+#include "src/core/datetime.h" // for DateTime
+
+
+#define MYNAME "energympro"
+
+//*******************************************************************************
+// local helper functions
+//*******************************************************************************
+void
+EnergymproFormat::read_point(route_head* gpsbabel_route, gpsbabel::DateTime& gpsDateTime) const
+{
+ tw_point point{};
+ point.Latitude = gbfgetuint32(file_in);
+ point.Longitude = gbfgetuint32(file_in);
+ point.Altitude = gbfgetint16(file_in);
+ point.reserved1 = gbfgetuint16(file_in);
+ point.Speed = gbfgetuint32(file_in);
+ point.IntervalDist = gbfgetuint16(file_in);
+ point.reserved2 = gbfgetuint16(file_in);
+ point.IntervalTime = gbfgetuint32(file_in);
+ point.Status = gbfgetc(file_in);
+ point.HR_Heartrate = gbfgetc(file_in);
+ point.HR_Status = gbfgetc(file_in);
+ point.reserved3 = gbfgetc(file_in);
+ point.Speed_Speed = gbfgetuint32(file_in);
+ point.Speed_Status = gbfgetc(file_in);
+ point.reserved4 = gbfgetc(file_in);
+ point.reserved5 = gbfgetc(file_in);
+ point.reserved6 = gbfgetc(file_in);
+ point.Cadence_Cadence = gbfgetc(file_in);
+ point.Cadence_Status = gbfgetc(file_in);
+ point.Power_Cadence = gbfgetuint16(file_in);
+ point.Power_Power = gbfgetuint16(file_in);
+ point.Power_Status = gbfgetc(file_in);
+ point.reserved7 = gbfgetc(file_in);
+ point.Temp = gbfgetc(file_in);
+ point.reserved8 = gbfgetc(file_in);
+ point.reserved9 = gbfgetc(file_in);
+ point.reserved10 = gbfgetc(file_in);
+ if (global_opts.debug_level > 1) {
+ printf("Point: lat:%8u long:%8u alt:%8d ", point.Latitude, point.Longitude, point.Altitude);
+ printf("speed:%6u dist:%5u time:%5u Status:%1u", point.Speed, point.IntervalDist, point.IntervalTime, point.Status);
+ printf("HR:(%3d,%1d)", point.HR_Heartrate, point.HR_Status);
+ printf("Speed:(%8u,%1d)", point.Speed_Speed, point.Speed_Status);
+ printf("Cad:(%3d,%1d)", point.Cadence_Cadence, point.Cadence_Status);
+ printf("Power (Cad:%6d Pow:%6d,%2d)Temp:%3d\n", point.Power_Cadence, point.Power_Power, point.Power_Status, point.Temp);
+
+ qDebug() << "DateTime1:" << gpsDateTime.toString();
+ qDebug() << "point.IntervalTime:" << point.IntervalTime;
+ }
+
+ //Time from last point in sec's * 10 (e.g. point.IntervalTime is sec multiplied with 10)
+ // convert to millisecs
+ gpsDateTime = gpsDateTime.addMSecs(point.IntervalTime*100);
+
+ auto* waypt = new Waypoint;
+ waypt->latitude = (point.Latitude / 1000000.0);
+ waypt->longitude = (point.Longitude / 1000000.0);
+ waypt->altitude = point.Altitude;
+
+ if (global_opts.debug_level > 1) {
+ qDebug() << "DateTime2:" << gpsDateTime.toString();
+ }
+
+ waypt->SetCreationTime(gpsDateTime);
+
+ if (point.Speed_Status == 0) {
+ WAYPT_SET(waypt, speed, point.Speed_Speed / 100.0f);
+ }
+ if (point.HR_Status == 0) {
+ waypt->heartrate = point.HR_Heartrate;
+ }
+ if (point.Cadence_Status == 0) {
+ waypt->cadence = point.Cadence_Cadence;
+ }
+ if (point.Power_Status == 0) {
+ waypt->power = point.Power_Power;
+ }
+ WAYPT_SET(waypt, temperature, point.Temp);
+ track_add_wpt(gpsbabel_route, waypt);
+}
+
+
+void
+EnergymproFormat::read_lap() const
+{
+ tw_lap lap{};
+ lap.splitTime = gbfgetuint32(file_in);
+ lap.TotalTime = gbfgetuint32(file_in);
+ lap.Number = gbfgetuint16(file_in);
+ lap.reserved1 = gbfgetuint16(file_in);
+ lap.lDistance = gbfgetuint32(file_in);
+ lap.Calorie = gbfgetuint16(file_in);
+ lap.reserved2 = gbfgetuint16(file_in);
+ lap.MaxSpeed = gbfgetuint32(file_in);
+ lap.AvgSpeed = gbfgetuint32(file_in);
+ lap.MaxHeartrate = gbfgetc(file_in);
+ lap.AvgHeartrate = gbfgetc(file_in);
+ lap.MinAlti = gbfgetint16(file_in);
+ lap.MaxAlti = gbfgetint16(file_in);
+ lap.AvgCad = gbfgetc(file_in);
+ lap.MaxCad = gbfgetc(file_in);
+ lap.AvgPower = gbfgetuint16(file_in);
+ lap.MaxPower = gbfgetuint16(file_in);
+ lap.StartRecPt = gbfgetuint16(file_in);
+ lap.FinishRecPt = gbfgetuint16(file_in);
+ if (global_opts.debug_level > 1) {
+ printf("LAP: splitTime:%6us TotalTime:%6us LapNumber:%5d ", lap.splitTime/10, lap.TotalTime/10, lap.Number);
+ printf("dist:%08um Cal:%5u Speed:(%6u,%6u) ", lap.lDistance, lap.Calorie, lap.MaxSpeed, lap.AvgSpeed);
+ printf("HR:(%3d,%3d)", lap.MaxHeartrate, lap.AvgHeartrate);
+ printf("Alt:(%6d,%6d) ", lap.MinAlti, lap.MaxAlti);
+ printf("Cad:(%3d,%3d) ", lap.AvgCad, lap.MaxCad);
+ printf("Power:(%3d,%3d)w ", lap.AvgPower, lap.MaxPower);
+ printf("Pt:(%6d,%6d)\n", lap.StartRecPt, lap.FinishRecPt);
+ }
+}
+
+//*******************************************************************************
+// global callbacks called by gpsbabel main process
+//*******************************************************************************
+
+void
+EnergymproFormat::rd_init(const QString& fname)
+{
+ if (global_opts.debug_level > 1) {
+ printf(MYNAME " rd_deinit()\n");
+ }
+ gbfile* fileorg_in = gbfopen(fname, "rb", MYNAME);
+
+ /* copy file to memory stream (needed for seek-ops and piped commands) */
+ file_in = gbfopen(nullptr, "wb", MYNAME);
+ gbsize_t size = gbfcopyfrom(file_in, fileorg_in, 0x7FFFFFFF);
+ if (global_opts.debug_level > 1) {
+ printf(MYNAME " filesize=%u\n", size);
+ }
+ gbfclose(fileorg_in);
+ if (opt_timezone) {
+ if (QTimeZone::isTimeZoneIdAvailable(opt_timezone)) {
+ timezn = new QTimeZone(opt_timezone);
+ } else {
+ list_timezones();
+ fatal(MYNAME ": Requested time zone \"%s\" is not available.\n", opt_timezone);
+ }
+ } else {
+ timezn = nullptr;
+ }
+}
+
+void
+EnergymproFormat::rd_deinit()
+{
+ if (timezn != nullptr) {
+ delete timezn;
+ timezn = nullptr;
+ }
+ if (global_opts.debug_level > 1) {
+ printf(MYNAME " rd_deinit()\n");
+ }
+ gbfclose(file_in);
+}
+
+void
+EnergymproFormat::track_read()
+{
+ if (global_opts.debug_level > 1) {
+ printf(MYNAME " waypoint_read()\n");
+ }
+
+ gbfseek(file_in, 0L, SEEK_END);
+ gbfseek(file_in, -(int32_t)(sizeof(tw_workout)), SEEK_CUR);
+ tw_workout workout{};
+ workout.dateStart.Year = gbfgetc(file_in);
+ workout.dateStart.Month = gbfgetc(file_in);
+ workout.dateStart.Day = gbfgetc(file_in);
+ workout.timeStart.Hour = gbfgetc(file_in);
+ workout.timeStart.Minute = gbfgetc(file_in);
+ workout.timeStart.Second = gbfgetc(file_in);
+ workout.TotalRecPt = gbfgetuint16(file_in);
+ workout.TotalTime = gbfgetuint32(file_in);
+ workout.TotalDist = gbfgetuint32(file_in);
+ workout.LapNumber = gbfgetuint16(file_in);
+ workout.Calory = gbfgetuint16(file_in);
+ workout.MaxSpeed = gbfgetuint32(file_in);
+ workout.AvgSpeed = gbfgetuint32(file_in);
+ workout.MaxHeart = gbfgetc(file_in);
+ workout.AvgHeart = gbfgetc(file_in);
+
+ if (global_opts.debug_level > 1) {
+ printf("%04d-%02d-%02d ", workout.dateStart.Year+2000, workout.dateStart.Month, workout.dateStart.Day);
+ printf("%02d:%02d:%02d ", workout.timeStart.Hour, workout.timeStart.Minute, workout.timeStart.Second);
+ printf("Total(RecPt:%6d Time:%6us Dist:%9um) LapNumber:%5d \n", workout.TotalRecPt, workout.TotalTime/10, workout.TotalDist, workout.LapNumber);
+ }
+
+ /*
+ * GPS year: 2000+; struct tm year: 1900+
+ */
+ QDate gpsDate = QDate(workout.dateStart.Year+2000, workout.dateStart.Month, workout.dateStart.Day);
+ QTime gpsTime = QTime(workout.timeStart.Hour, workout.timeStart.Minute, workout.timeStart.Second);
+ gpsbabel::DateTime gpsDateTime;
+ if (timezn != nullptr) {
+ gpsDateTime = gpsbabel::DateTime(QDateTime(gpsDate, gpsTime, *timezn).toUTC());
+ } else {
+ gpsDateTime = gpsbabel::DateTime(QDateTime(gpsDate, gpsTime, Qt::LocalTime).toUTC());
+ }
+
+ auto* gpsbabel_route = new route_head;
+
+ track_add_head(gpsbabel_route);
+ gbfseek(file_in, 0L, SEEK_SET);
+
+ for (int point=0; point<workout.TotalRecPt; point++) {
+ read_point(gpsbabel_route, gpsDateTime);
+ }
+
+ gbfseek(file_in, sizeof(tw_point)*(workout.TotalRecPt), SEEK_SET);
+ for (int lap=0; lap<workout.LapNumber; lap++) {
+ read_lap();
+ }
+}
+
+void
+EnergymproFormat::read()
+{
+ if (global_opts.debug_level > 1) {
+ printf(MYNAME " data_read()\n");
+ }
+
+ track_read();
+}
--- /dev/null
+/*
+ Handle energympro (GPS training watch) .cpo files
+
+ Copyright (c) 2014 Zingo Andersen zingo@vectrace.com
+ Copyright (C) 2014 Robert Lipe, robertlipe+source@gpsbabel.org
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ */
+#ifndef ENERGYMPRO_H_INCLUDED_
+#define ENERGYMPRO_H_INCLUDED_
+
+#include <cstdint> // for uint8_t, uint16_t, uint32_t, int16_t
+
+#include <QString> // for QString
+#include <QTimeZone> // for QTimeZone
+#include <QVector> // for QVector
+
+#include "defs.h"
+#include "format.h" // for Format
+#include "gbfile.h" // for gbfgetc, gbfseek, gbfclose, gbfopen, gbfread, gbfgetuint32, gbfcopyfrom, gbfgetuint16, gbfile, gbsize_t
+#include "src/core/datetime.h" // for DateTime
+
+
+class EnergymproFormat : public Format
+{
+public:
+ QVector<arglist_t>* get_args() override
+ {
+ return &energympro_args;
+ }
+
+ ff_type get_type() const override
+ {
+ return ff_type_file;
+ }
+
+ QVector<ff_cap> get_cap() const override
+ {
+ return {
+ ff_cap_none, // waypoints
+ ff_cap_read, // tracks
+ ff_cap_none // routes
+ };
+ }
+
+ QString get_encode() const override
+ {
+ return CET_CHARSET_ASCII;
+ }
+
+ int get_fixed_encode() const override
+ {
+ return 0;
+ }
+
+ void rd_init(const QString& fname) override;
+ void read() override;
+ void rd_deinit() override;
+
+private:
+ /* Types */
+
+ struct tw_date {
+ uint8_t Year;
+ uint8_t Month;
+ uint8_t Day;
+ };
+
+ struct tw_time {
+ uint8_t Hour;
+ uint8_t Minute;
+ uint8_t Second;
+ };
+
+ struct tw_workout {
+ tw_date dateStart; // start date
+ tw_time timeStart; // start time
+ uint16_t TotalRecPt; // Total record Point
+ uint32_t TotalTime; // Total Time
+ uint32_t TotalDist; // Total Distance
+ uint16_t LapNumber; // Lap Number
+ uint16_t Calory; // Calory
+ uint32_t MaxSpeed; // Max Speed
+ uint32_t AvgSpeed; // average Speed
+ uint8_t MaxHeart; // Max Heartrate
+ uint8_t AvgHeart; // average Heart
+ uint16_t Ascent; // Ascent
+ uint16_t Descent; // Descent
+ int16_t MinAlti; // Min Altitude
+ int16_t MaxAlti; // Max Altitude
+ uint8_t AvgCad; // average Cadence
+ uint8_t MaxCad; // Best Cadence
+ uint16_t AvgPower; // average Power
+ uint16_t MaxPower; // Max Power
+ char VersionProduct[15];
+ uint8_t reserved1;
+ uint8_t VersionVerNum;
+ uint8_t reserved2[17];
+ };
+
+ struct tw_point {
+ uint32_t Latitude;
+ uint32_t Longitude;
+ int16_t Altitude;
+ uint16_t reserved1;
+ uint32_t Speed;
+ uint16_t IntervalDist; // Interval Distance
+ uint16_t reserved2;
+ uint32_t IntervalTime; // Interval time
+ uint8_t Status; //Status (0 = ok, 1 = miss, 2 = no good, 3 = bad)
+ uint8_t HR_Heartrate;
+ uint8_t HR_Status;
+ uint8_t reserved3;
+ uint32_t Speed_Speed;
+ uint8_t Speed_Status;
+ uint8_t reserved4;
+ uint8_t reserved5;
+ uint8_t reserved6;
+ uint8_t Cadence_Cadence;
+ uint8_t Cadence_Status;
+ uint16_t Power_Cadence;
+ uint16_t Power_Power;
+ uint8_t Power_Status;
+ uint8_t reserved7;
+ uint8_t Temp;
+ uint8_t reserved8;
+ uint8_t reserved9;
+ uint8_t reserved10;
+ };
+
+ struct tw_lap {
+ uint32_t splitTime; // split time
+ uint32_t TotalTime; // Total Time
+ uint16_t Number; // Number
+ uint16_t reserved1;
+ uint32_t lDistance; // Distance
+ uint16_t Calorie; // Calorie
+ uint16_t reserved2;
+ uint32_t MaxSpeed; // Max Speed
+ uint32_t AvgSpeed; // average Speed
+ uint8_t MaxHeartrate; // Max Heartrate
+ uint8_t AvgHeartrate; // average Heartrate
+ int16_t MinAlti; // Min Altitude
+ int16_t MaxAlti; // Max Altitude
+ uint8_t AvgCad; // average Cadence
+ uint8_t MaxCad; // Max Cadence
+ uint16_t AvgPower; // average Power
+ uint16_t MaxPower; // Max Power
+ uint16_t StartRecPt; // start record point
+ uint16_t FinishRecPt; // Finish record point
+ };
+
+ /* Member Functions */
+
+ void read_point(route_head* gpsbabel_route, gpsbabel::DateTime& gpsDateTime) const;
+ void read_lap() const;
+ void track_read();
+
+ /* Data Members */
+
+ gbfile* file_in{nullptr};
+ char* opt_timezone{nullptr};
+ QTimeZone* timezn{nullptr};
+
+ QVector<arglist_t> energympro_args = {
+ {"timezone", &opt_timezone, "Time zone ID", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr},
+ };
+};
+#endif // ENERGYMPRO_H_INCLUDED_
--- /dev/null
+/*
+ Enigma route and waypoint file format.
+ http://www.mglavionics.co.za/Docs/Enigma%20Waypoint%20format.pdf
+ Binary data are stored in little endian (Intel)
+
+ Copyright (C) 2009 Tobias Kretschmar, tobias.kretschmar@gmx.de
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ */
+
+#include <cmath> // for fabs, lround
+#include <cstdint> // for int32_t, uint8_t, uint32_t
+#include <cstdlib> // for abs
+#include <cstring> // for strlen, memcpy, memset
+
+#include <QString> // for QString
+
+#include "defs.h"
+#include "gbfile.h" // for gbfclose, gbfopen_le, gbfread, gbfwrite, gbfile
+
+
+#define MYNAME "Enigma binary route and waypoint file format"
+
+#define WTYPE_WAYPOINT 0 // Waypoint of unspecified type
+#define WTYPE_AIRPORT 1 // Typical assignment for medium sized airports
+#define WTYPE_MAJORAIRPORT 2 // Typical assignment for large and international airports
+#define WTYPE_SEAPLANEBASE 3
+#define WTYPE_AIRFIELD 4 // Typical assignment for smaller municipal airfields, glider fields etc
+#define WTYPE_PRIVATEAIRFIELD 5
+#define WTYPE_ULTRALIGHTFIELD 6
+#define WTYPE_INTERSECTION 7 // (reporting point, boundary crossing)
+#define WTYPE_HELIPORT 8
+#define WTYPE_TACAN 9
+#define WTYPE_NDBDME 10
+#define WTYPE_NDB 11
+#define WTYPE_VORDME 12
+#define WTYPE_VORTAC 13
+#define WTYPE_FANMARKER 14
+#define WTYPE_VOR 15
+#define WTYPE_REPPT 16
+#define WTYPE_LFR 17
+#define WTYPE_UHFNDB 18
+#define WTYPE_MNDB 19
+#define WTYPE_MNDBDME 20
+#define WTYPE_LOM 21
+#define WTYPE_LMM 22
+#define WTYPE_LOCSDF 23
+#define WTYPE_MLSISMLS 24
+#define WTYPE_OTHERNAV 25 // Navaid not falling into any of the above types
+#define WTYPE_ALTITUDECHANGE 26 // Location at which altitude should be changed
+
+union wpt_data {
+ int32_t wp_altitude; // Waypoint type 0-6,8: waypoint altitude in feet
+ int32_t tg_altitude; // Waypoint type 26: target altitude in feet
+ uint32_t frequency; // Waypoint type 9-25: freq in steps of 1000Hz (118Mhz = 180000)
+ int32_t dummy; // waypoint type 7, unused
+};
+
+struct enigma_wpt {
+ int32_t latitude;
+ int32_t longitude;
+ union wpt_data data;
+ uint8_t waypoint_type;
+ uint8_t shortname_len; // number of used characters in shortname
+ char shortname[6]; // ASCII, unused characters are "don't care" values
+ uint8_t longname_len; // number of used characters in longname
+ char longname[27]; // ASCII, unused characters are "don't care" values
+};
+
+static gbfile* file_in, *file_out;
+
+static void
+rd_init(const QString& fname)
+{
+ file_in = gbfopen_le(fname, "rb", MYNAME);
+}
+
+static int32_t decToEnigmaPosition(double val)
+{
+ int degrees = fabs(val);
+ double frac = fabs(val) - degrees;
+ int enigmadeg = degrees * 180000;
+ int enigmafrac = 180000 * frac;
+ int sign = (val < 0) ? -1 : +1;
+ return sign * (enigmadeg + enigmafrac);
+}
+
+static float enigmaPositionToDec(int32_t val)
+{
+ int deg = abs(val) / 180000;
+ int enigmafrac = abs(val) % 180000;
+ double frac = (double)enigmafrac / 180000;
+ int sign = (val < 0) ? -1 : +1;
+ return sign * (deg + frac);
+}
+
+static void
+data_read()
+{
+ enigma_wpt ewpt;
+ auto* route = new route_head;
+ route_add_head(route);
+
+ while (1 == gbfread(&ewpt, sizeof(ewpt), 1, file_in)) {
+ auto* wpt = new Waypoint;
+ wpt->latitude = enigmaPositionToDec(le_read32(&ewpt.latitude));
+ wpt->longitude = enigmaPositionToDec(le_read32(&ewpt.longitude));
+ char*sn = xstrndup(ewpt.shortname, ewpt.shortname_len);
+ wpt->shortname = sn;
+ xfree(sn);
+
+ char* ds = xstrndup(ewpt.longname, ewpt.longname_len);
+ wpt->description = ds;
+ xfree(ds);
+
+ switch (ewpt.waypoint_type) {
+ case WTYPE_WAYPOINT: // 0
+ case WTYPE_AIRPORT: // 1
+ case WTYPE_MAJORAIRPORT: // 2
+ case WTYPE_SEAPLANEBASE: // 3
+ case WTYPE_AIRFIELD: // 4
+ case WTYPE_PRIVATEAIRFIELD: // 5
+ case WTYPE_ULTRALIGHTFIELD: // 6
+ case WTYPE_HELIPORT: // 8
+ // waypoint altitude
+ wpt->altitude = FEET_TO_METERS(le_read32(&ewpt.data.wp_altitude) - 1000);
+ break;
+ case WTYPE_ALTITUDECHANGE: // 26
+ // target altitude
+ wpt->altitude = FEET_TO_METERS(le_read32(&ewpt.data.tg_altitude) - 1000);
+ break;
+ case WTYPE_INTERSECTION: // 7
+ // unused
+ break;
+ default:
+ // frequency
+ // wpt->frequency = wpt.le_readu32(ewpt.data.frequency);
+ ;
+ }
+ route_add_wpt(route, wpt);
+ }
+}
+
+static void
+rd_deinit()
+{
+ gbfclose(file_in);
+}
+
+static void
+wr_init(const QString& fname)
+{
+ file_out = gbfopen_le(fname, "wb", MYNAME);
+}
+
+#ifndef min
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+#endif
+#ifndef max
+#define max(a,b) (((a) > (b)) ? (a) : (b))
+#endif
+
+static void
+enigma_waypt_disp(const Waypoint* wpt)
+{
+ enigma_wpt ewpt;
+
+ memset(&ewpt, 0, sizeof(ewpt));
+
+ le_write32(&ewpt.latitude, decToEnigmaPosition(wpt->latitude));
+ le_write32(&ewpt.longitude, decToEnigmaPosition(wpt->longitude));
+ ewpt.waypoint_type = WTYPE_WAYPOINT;
+ if (wpt->altitude != unknown_alt) {
+ le_write32(&ewpt.data.wp_altitude, lround(METERS_TO_FEET(wpt->altitude)) + 1000);
+ }
+ if (wpt->shortname != nullptr) {
+ ewpt.shortname_len = (uint8_t) min(6, strlen(CSTRc(wpt->shortname)));
+ memcpy(ewpt.shortname, CSTRc(wpt->shortname), ewpt.shortname_len);
+ }
+ if (wpt->description != nullptr) {
+ ewpt.longname_len = (uint8_t) min(27, strlen(CSTRc(wpt->description)));
+ memcpy(ewpt.longname, CSTRc(wpt->description), ewpt.longname_len);
+ }
+ gbfwrite(&ewpt, sizeof(ewpt), 1, file_out);
+}
+
+static void
+data_write()
+{
+ route_disp_all(nullptr, nullptr, enigma_waypt_disp);
+}
+
+static void
+wr_deinit()
+{
+ gbfclose(file_out);
+}
+
+ff_vecs_t enigma_vecs = {
+ ff_type_file,
+ {
+ ff_cap_none, /* waypoints */
+ ff_cap_none, /* tracks */
+ (ff_cap)(ff_cap_read | ff_cap_write) /* routes */
+ },
+ rd_init,
+ wr_init,
+ rd_deinit,
+ wr_deinit,
+ data_read,
+ data_write,
+ nullptr,
+ nullptr,
+ CET_CHARSET_ASCII, 0, /* CET-REVIEW */
+ NULL_POS_OPS
+};
+++ /dev/null
-/*
- Access to EasyGPS files.
-
- Copyright (C) 2003 Robert Lipe, robertlipe+source@gpsbabel.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
-
-
-#include "defs.h"
-#include <cstdio>
-
-static gbfile* file_in;
-static gbfile* file_out;
-static short_handle mkshort_handle;
-/* static char *deficon = NULL; */
-
-#define MYNAME "EasyGPS"
-
-static
-QVector<arglist_t> easygps_args = {
- /* {"deficon", &deficon, "Default icon name", "Waypoint",
- ARGTYPE_STRING}, */
-};
-
-static void
-rd_init(const QString& fname)
-{
- char ibuf[100] = {'0'} ;
- const char* ezsig = "TerraByte Location File";
-
- file_in = gbfopen_le(fname, "rb", MYNAME);
-
- int sz = gbfread(ibuf, 1, 52, file_in);
-
- if ((sz < 52) ||
- strncmp(ibuf, ezsig, strlen(ezsig)) != 0 ||
- (ibuf[51] != 'W')) {
- fatal(MYNAME ": %s is not an EasyGPS file.\n", qPrintable(fname));
- }
-}
-
-static void
-rd_deinit()
-{
- gbfclose(file_in);
-}
-
-static void
-wr_init(const QString& fname)
-{
- file_out = gbfopen_le(fname, "wb", MYNAME);
- mkshort_handle = mkshort_new_handle();
-}
-
-static void
-wr_deinit()
-{
- gbfclose(file_out);
- mkshort_del_handle(&mkshort_handle);
-}
-
-static void
-data_read()
-{
- int p;
- char ibuf[10];
- do {
- auto* wpt_tmp = new Waypoint;
- UrlLink link;
-
- for (int tag = gbfgetc(file_in); tag != 0xff; tag = gbfgetc(file_in)) {
- switch (tag) {
- case 1:
- wpt_tmp->shortname = gbfgetpstr(file_in);
- break;
- case 2:
- case 3:
- wpt_tmp->description = gbfgetpstr(file_in);
- break;
- case 5:
- wpt_tmp->notes = gbfgetpstr(file_in);
- break;
- case 6: {
- QString ult = gbfgetpstr(file_in);
- link.url_link_text_ = ult;
- }
- break;
- case 7: {
- QString id = gbfgetpstr(file_in);
- wpt_tmp->icon_descr = id;
- }
- break;
- case 8: /* NULL Terminated (vs. pascal) descr */
- wpt_tmp->notes = gbfgetcstr(file_in);
- break;
- case 9: { /* NULL Terminated (vs. pascal) link */
- QString url = gbfgetcstr(file_in);
- link.url_ = url;
- }
- break;
- case 0x10: {
- QString ult = gbfgetcstr(file_in);
- link.url_link_text_ = ult;
- }
- break;
- case 0x63:
- wpt_tmp->latitude = gbfgetdbl(file_in);
- break;
- case 0x64:
- wpt_tmp->longitude = gbfgetdbl(file_in);
- break;
- case 0x65:
- case 0x66:
- gbfread(ibuf, 8, 1, file_in);
- break;
- case 0x84:
- case 0x85:
- gbfread(ibuf, 4, 1, file_in);
- break;
- case 0x86: /* May be proximity. I think it's time. */
- gbfread(ibuf, 4, 1, file_in);
- break;
- default:
- printf("Unknown tag %x\n", tag);
- }
- }
- if (!link.url_.isEmpty() || !link.url_link_text_.isEmpty()) {
- wpt_tmp->AddUrlLink(link);
- }
- waypt_add(wpt_tmp);
- p = gbfgetc(file_in);
- } while (!gbfeof(file_in) && (p == 'W'));
-}
-
-
-static void
-ez_disp(const Waypoint* wpt)
-{
- gbfputc('W', file_out);
- if (!wpt->shortname.isEmpty()) {
- gbfputc(1, file_out);
- gbfputpstr(wpt->shortname, file_out);
- }
- if (!wpt->description.isEmpty()) {
- gbfputc(3, file_out);
- gbfputpstr(wpt->description, file_out);
- }
- if (!wpt->icon_descr.isNull()) {
- gbfputc(7, file_out);
- gbfputpstr(wpt->icon_descr, file_out);
- }
- gbfputc(0x63, file_out);
- gbfputdbl(wpt->latitude, file_out);
-
- gbfputc(0x64, file_out);
- gbfputdbl(wpt->longitude, file_out);
- if (!wpt->notes.isEmpty()) {
- gbfputc(5, file_out);
- gbfputpstr(wpt->notes, file_out);
- }
- if (wpt->HasUrlLink()) {
- UrlLink link = wpt->GetUrlLink();
- if (!link.url_link_text_.isEmpty()) {
- gbfputc(6, file_out);
- gbfputpstr(link.url_link_text_, file_out);
- }
- if (!link.url_.isEmpty()) {
- gbfputc(9, file_out);
- gbfputcstr(CSTRc(link.url_), file_out);
- }
- }
- gbfputc(0xff, file_out);
-}
-
-static void
-data_write()
-{
- setshort_length(mkshort_handle, 6);
-
- gbfprintf(file_out,
- "TerraByte Location File Copyright 2001 TopoGrafix\n");
- /*
- * I don't know what this is.
- */
- gbfprintf(file_out, "%c", 0xb);
-
- waypt_disp_all(ez_disp);
-
- /*
- * Files seem to always end in a zero.
- */
- gbfputc(0x00, file_out);
-}
-
-
-ff_vecs_t easygps_vecs = {
- ff_type_file,
- FF_CAP_RW_WPT,
- rd_init,
- wr_init,
- rd_deinit,
- wr_deinit,
- data_read,
- data_write,
- nullptr,
- &easygps_args,
- CET_CHARSET_ASCII, 0 /* CET REVIEW */
- , NULL_POS_OPS
-};
+++ /dev/null
-/*
- Handle energympro (GPS training watch) .cpo files
-
- Copyright (c) 2014 Zingo Andersen zingo@vectrace.com
- Copyright (C) 2014 Robert Lipe, robertlipe+source@gpsbabel.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- */
-
-#include <cstdint> // for int32_t
-#include <cstdio> // for printf, SEEK_SET, SEEK_CUR, SEEK_END
-
-#include <QDate> // for QDate
-#include <QDateTime> // for QDateTime
-#include <QDebug> // for QDebug
-#include <QString> // for QString
-#include <QTime> // for QTime
-#include <QTimeZone> // for QTimeZone
-#include <Qt> // for UTC
-
-#include "defs.h"
-#include "energympro.h"
-#include "gbfile.h" // for gbfgetc, gbfgetuint16, gbfgetuint32, gbfseek, gbfgetint16, gbfclose, gbfopen, gbfcopyfrom, gbfile, gbsize_t
-#include "src/core/datetime.h" // for DateTime
-
-
-#define MYNAME "energympro"
-
-//*******************************************************************************
-// local helper functions
-//*******************************************************************************
-void
-EnergymproFormat::read_point(route_head* gpsbabel_route, gpsbabel::DateTime& gpsDateTime) const
-{
- tw_point point{};
- point.Latitude = gbfgetuint32(file_in);
- point.Longitude = gbfgetuint32(file_in);
- point.Altitude = gbfgetint16(file_in);
- point.reserved1 = gbfgetuint16(file_in);
- point.Speed = gbfgetuint32(file_in);
- point.IntervalDist = gbfgetuint16(file_in);
- point.reserved2 = gbfgetuint16(file_in);
- point.IntervalTime = gbfgetuint32(file_in);
- point.Status = gbfgetc(file_in);
- point.HR_Heartrate = gbfgetc(file_in);
- point.HR_Status = gbfgetc(file_in);
- point.reserved3 = gbfgetc(file_in);
- point.Speed_Speed = gbfgetuint32(file_in);
- point.Speed_Status = gbfgetc(file_in);
- point.reserved4 = gbfgetc(file_in);
- point.reserved5 = gbfgetc(file_in);
- point.reserved6 = gbfgetc(file_in);
- point.Cadence_Cadence = gbfgetc(file_in);
- point.Cadence_Status = gbfgetc(file_in);
- point.Power_Cadence = gbfgetuint16(file_in);
- point.Power_Power = gbfgetuint16(file_in);
- point.Power_Status = gbfgetc(file_in);
- point.reserved7 = gbfgetc(file_in);
- point.Temp = gbfgetc(file_in);
- point.reserved8 = gbfgetc(file_in);
- point.reserved9 = gbfgetc(file_in);
- point.reserved10 = gbfgetc(file_in);
- if (global_opts.debug_level > 1) {
- printf("Point: lat:%8u long:%8u alt:%8d ", point.Latitude, point.Longitude, point.Altitude);
- printf("speed:%6u dist:%5u time:%5u Status:%1u", point.Speed, point.IntervalDist, point.IntervalTime, point.Status);
- printf("HR:(%3d,%1d)", point.HR_Heartrate, point.HR_Status);
- printf("Speed:(%8u,%1d)", point.Speed_Speed, point.Speed_Status);
- printf("Cad:(%3d,%1d)", point.Cadence_Cadence, point.Cadence_Status);
- printf("Power (Cad:%6d Pow:%6d,%2d)Temp:%3d\n", point.Power_Cadence, point.Power_Power, point.Power_Status, point.Temp);
-
- qDebug() << "DateTime1:" << gpsDateTime.toString();
- qDebug() << "point.IntervalTime:" << point.IntervalTime;
- }
-
- //Time from last point in sec's * 10 (e.g. point.IntervalTime is sec multiplied with 10)
- // convert to millisecs
- gpsDateTime = gpsDateTime.addMSecs(point.IntervalTime*100);
-
- auto* waypt = new Waypoint;
- waypt->latitude = (point.Latitude / 1000000.0);
- waypt->longitude = (point.Longitude / 1000000.0);
- waypt->altitude = point.Altitude;
-
- if (global_opts.debug_level > 1) {
- qDebug() << "DateTime2:" << gpsDateTime.toString();
- }
-
- waypt->SetCreationTime(gpsDateTime);
-
- if (point.Speed_Status == 0) {
- WAYPT_SET(waypt, speed, point.Speed_Speed / 100.0f);
- }
- if (point.HR_Status == 0) {
- waypt->heartrate = point.HR_Heartrate;
- }
- if (point.Cadence_Status == 0) {
- waypt->cadence = point.Cadence_Cadence;
- }
- if (point.Power_Status == 0) {
- waypt->power = point.Power_Power;
- }
- WAYPT_SET(waypt, temperature, point.Temp);
- track_add_wpt(gpsbabel_route, waypt);
-}
-
-
-void
-EnergymproFormat::read_lap() const
-{
- tw_lap lap{};
- lap.splitTime = gbfgetuint32(file_in);
- lap.TotalTime = gbfgetuint32(file_in);
- lap.Number = gbfgetuint16(file_in);
- lap.reserved1 = gbfgetuint16(file_in);
- lap.lDistance = gbfgetuint32(file_in);
- lap.Calorie = gbfgetuint16(file_in);
- lap.reserved2 = gbfgetuint16(file_in);
- lap.MaxSpeed = gbfgetuint32(file_in);
- lap.AvgSpeed = gbfgetuint32(file_in);
- lap.MaxHeartrate = gbfgetc(file_in);
- lap.AvgHeartrate = gbfgetc(file_in);
- lap.MinAlti = gbfgetint16(file_in);
- lap.MaxAlti = gbfgetint16(file_in);
- lap.AvgCad = gbfgetc(file_in);
- lap.MaxCad = gbfgetc(file_in);
- lap.AvgPower = gbfgetuint16(file_in);
- lap.MaxPower = gbfgetuint16(file_in);
- lap.StartRecPt = gbfgetuint16(file_in);
- lap.FinishRecPt = gbfgetuint16(file_in);
- if (global_opts.debug_level > 1) {
- printf("LAP: splitTime:%6us TotalTime:%6us LapNumber:%5d ", lap.splitTime/10, lap.TotalTime/10, lap.Number);
- printf("dist:%08um Cal:%5u Speed:(%6u,%6u) ", lap.lDistance, lap.Calorie, lap.MaxSpeed, lap.AvgSpeed);
- printf("HR:(%3d,%3d)", lap.MaxHeartrate, lap.AvgHeartrate);
- printf("Alt:(%6d,%6d) ", lap.MinAlti, lap.MaxAlti);
- printf("Cad:(%3d,%3d) ", lap.AvgCad, lap.MaxCad);
- printf("Power:(%3d,%3d)w ", lap.AvgPower, lap.MaxPower);
- printf("Pt:(%6d,%6d)\n", lap.StartRecPt, lap.FinishRecPt);
- }
-}
-
-//*******************************************************************************
-// global callbacks called by gpsbabel main process
-//*******************************************************************************
-
-void
-EnergymproFormat::rd_init(const QString& fname)
-{
- if (global_opts.debug_level > 1) {
- printf(MYNAME " rd_deinit()\n");
- }
- gbfile* fileorg_in = gbfopen(fname, "rb", MYNAME);
-
- /* copy file to memory stream (needed for seek-ops and piped commands) */
- file_in = gbfopen(nullptr, "wb", MYNAME);
- gbsize_t size = gbfcopyfrom(file_in, fileorg_in, 0x7FFFFFFF);
- if (global_opts.debug_level > 1) {
- printf(MYNAME " filesize=%u\n", size);
- }
- gbfclose(fileorg_in);
- if (opt_timezone) {
- if (QTimeZone::isTimeZoneIdAvailable(opt_timezone)) {
- timezn = new QTimeZone(opt_timezone);
- } else {
- list_timezones();
- fatal(MYNAME ": Requested time zone \"%s\" is not available.\n", opt_timezone);
- }
- } else {
- timezn = nullptr;
- }
-}
-
-void
-EnergymproFormat::rd_deinit()
-{
- if (timezn != nullptr) {
- delete timezn;
- timezn = nullptr;
- }
- if (global_opts.debug_level > 1) {
- printf(MYNAME " rd_deinit()\n");
- }
- gbfclose(file_in);
-}
-
-void
-EnergymproFormat::track_read()
-{
- if (global_opts.debug_level > 1) {
- printf(MYNAME " waypoint_read()\n");
- }
-
- gbfseek(file_in, 0L, SEEK_END);
- gbfseek(file_in, -(int32_t)(sizeof(tw_workout)), SEEK_CUR);
- tw_workout workout{};
- workout.dateStart.Year = gbfgetc(file_in);
- workout.dateStart.Month = gbfgetc(file_in);
- workout.dateStart.Day = gbfgetc(file_in);
- workout.timeStart.Hour = gbfgetc(file_in);
- workout.timeStart.Minute = gbfgetc(file_in);
- workout.timeStart.Second = gbfgetc(file_in);
- workout.TotalRecPt = gbfgetuint16(file_in);
- workout.TotalTime = gbfgetuint32(file_in);
- workout.TotalDist = gbfgetuint32(file_in);
- workout.LapNumber = gbfgetuint16(file_in);
- workout.Calory = gbfgetuint16(file_in);
- workout.MaxSpeed = gbfgetuint32(file_in);
- workout.AvgSpeed = gbfgetuint32(file_in);
- workout.MaxHeart = gbfgetc(file_in);
- workout.AvgHeart = gbfgetc(file_in);
-
- if (global_opts.debug_level > 1) {
- printf("%04d-%02d-%02d ", workout.dateStart.Year+2000, workout.dateStart.Month, workout.dateStart.Day);
- printf("%02d:%02d:%02d ", workout.timeStart.Hour, workout.timeStart.Minute, workout.timeStart.Second);
- printf("Total(RecPt:%6d Time:%6us Dist:%9um) LapNumber:%5d \n", workout.TotalRecPt, workout.TotalTime/10, workout.TotalDist, workout.LapNumber);
- }
-
- /*
- * GPS year: 2000+; struct tm year: 1900+
- */
- QDate gpsDate = QDate(workout.dateStart.Year+2000, workout.dateStart.Month, workout.dateStart.Day);
- QTime gpsTime = QTime(workout.timeStart.Hour, workout.timeStart.Minute, workout.timeStart.Second);
- gpsbabel::DateTime gpsDateTime;
- if (timezn != nullptr) {
- gpsDateTime = gpsbabel::DateTime(QDateTime(gpsDate, gpsTime, *timezn).toUTC());
- } else {
- gpsDateTime = gpsbabel::DateTime(QDateTime(gpsDate, gpsTime, Qt::LocalTime).toUTC());
- }
-
- auto* gpsbabel_route = new route_head;
-
- track_add_head(gpsbabel_route);
- gbfseek(file_in, 0L, SEEK_SET);
-
- for (int point=0; point<workout.TotalRecPt; point++) {
- read_point(gpsbabel_route, gpsDateTime);
- }
-
- gbfseek(file_in, sizeof(tw_point)*(workout.TotalRecPt), SEEK_SET);
- for (int lap=0; lap<workout.LapNumber; lap++) {
- read_lap();
- }
-}
-
-void
-EnergymproFormat::read()
-{
- if (global_opts.debug_level > 1) {
- printf(MYNAME " data_read()\n");
- }
-
- track_read();
-}
+++ /dev/null
-/*
- Handle energympro (GPS training watch) .cpo files
-
- Copyright (c) 2014 Zingo Andersen zingo@vectrace.com
- Copyright (C) 2014 Robert Lipe, robertlipe+source@gpsbabel.org
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- */
-#ifndef ENERGYMPRO_H_INCLUDED_
-#define ENERGYMPRO_H_INCLUDED_
-
-#include <cstdint> // for uint8_t, uint16_t, uint32_t, int16_t
-
-#include <QString> // for QString
-#include <QTimeZone> // for QTimeZone
-#include <QVector> // for QVector
-
-#include "defs.h"
-#include "format.h" // for Format
-#include "gbfile.h" // for gbfgetc, gbfseek, gbfclose, gbfopen, gbfread, gbfgetuint32, gbfcopyfrom, gbfgetuint16, gbfile, gbsize_t
-#include "src/core/datetime.h" // for DateTime
-
-
-class EnergymproFormat : public Format
-{
-public:
- QVector<arglist_t>* get_args() override
- {
- return &energympro_args;
- }
-
- ff_type get_type() const override
- {
- return ff_type_file;
- }
-
- QVector<ff_cap> get_cap() const override
- {
- return {
- ff_cap_none, // waypoints
- ff_cap_read, // tracks
- ff_cap_none // routes
- };
- }
-
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
- void rd_init(const QString& fname) override;
- void read() override;
- void rd_deinit() override;
-
-private:
- /* Types */
-
- struct tw_date {
- uint8_t Year;
- uint8_t Month;
- uint8_t Day;
- };
-
- struct tw_time {
- uint8_t Hour;
- uint8_t Minute;
- uint8_t Second;
- };
-
- struct tw_workout {
- tw_date dateStart; // start date
- tw_time timeStart; // start time
- uint16_t TotalRecPt; // Total record Point
- uint32_t TotalTime; // Total Time
- uint32_t TotalDist; // Total Distance
- uint16_t LapNumber; // Lap Number
- uint16_t Calory; // Calory
- uint32_t MaxSpeed; // Max Speed
- uint32_t AvgSpeed; // average Speed
- uint8_t MaxHeart; // Max Heartrate
- uint8_t AvgHeart; // average Heart
- uint16_t Ascent; // Ascent
- uint16_t Descent; // Descent
- int16_t MinAlti; // Min Altitude
- int16_t MaxAlti; // Max Altitude
- uint8_t AvgCad; // average Cadence
- uint8_t MaxCad; // Best Cadence
- uint16_t AvgPower; // average Power
- uint16_t MaxPower; // Max Power
- char VersionProduct[15];
- uint8_t reserved1;
- uint8_t VersionVerNum;
- uint8_t reserved2[17];
- };
-
- struct tw_point {
- uint32_t Latitude;
- uint32_t Longitude;
- int16_t Altitude;
- uint16_t reserved1;
- uint32_t Speed;
- uint16_t IntervalDist; // Interval Distance
- uint16_t reserved2;
- uint32_t IntervalTime; // Interval time
- uint8_t Status; //Status (0 = ok, 1 = miss, 2 = no good, 3 = bad)
- uint8_t HR_Heartrate;
- uint8_t HR_Status;
- uint8_t reserved3;
- uint32_t Speed_Speed;
- uint8_t Speed_Status;
- uint8_t reserved4;
- uint8_t reserved5;
- uint8_t reserved6;
- uint8_t Cadence_Cadence;
- uint8_t Cadence_Status;
- uint16_t Power_Cadence;
- uint16_t Power_Power;
- uint8_t Power_Status;
- uint8_t reserved7;
- uint8_t Temp;
- uint8_t reserved8;
- uint8_t reserved9;
- uint8_t reserved10;
- };
-
- struct tw_lap {
- uint32_t splitTime; // split time
- uint32_t TotalTime; // Total Time
- uint16_t Number; // Number
- uint16_t reserved1;
- uint32_t lDistance; // Distance
- uint16_t Calorie; // Calorie
- uint16_t reserved2;
- uint32_t MaxSpeed; // Max Speed
- uint32_t AvgSpeed; // average Speed
- uint8_t MaxHeartrate; // Max Heartrate
- uint8_t AvgHeartrate; // average Heartrate
- int16_t MinAlti; // Min Altitude
- int16_t MaxAlti; // Max Altitude
- uint8_t AvgCad; // average Cadence
- uint8_t MaxCad; // Max Cadence
- uint16_t AvgPower; // average Power
- uint16_t MaxPower; // Max Power
- uint16_t StartRecPt; // start record point
- uint16_t FinishRecPt; // Finish record point
- };
-
- /* Member Functions */
-
- void read_point(route_head* gpsbabel_route, gpsbabel::DateTime& gpsDateTime) const;
- void read_lap() const;
- void track_read();
-
- /* Data Members */
-
- gbfile* file_in{nullptr};
- char* opt_timezone{nullptr};
- QTimeZone* timezn{nullptr};
-
- QVector<arglist_t> energympro_args = {
- {"timezone", &opt_timezone, "Time zone ID", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr},
- };
-};
-#endif // ENERGYMPRO_H_INCLUDED_
+++ /dev/null
-/*
- Enigma route and waypoint file format.
- http://www.mglavionics.co.za/Docs/Enigma%20Waypoint%20format.pdf
- Binary data are stored in little endian (Intel)
-
- Copyright (C) 2009 Tobias Kretschmar, tobias.kretschmar@gmx.de
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
- */
-
-#include <cmath> // for fabs, lround
-#include <cstdint> // for int32_t, uint8_t, uint32_t
-#include <cstdlib> // for abs
-#include <cstring> // for strlen, memcpy, memset
-
-#include <QString> // for QString
-
-#include "defs.h"
-#include "gbfile.h" // for gbfclose, gbfopen_le, gbfread, gbfwrite, gbfile
-
-
-#define MYNAME "Enigma binary route and waypoint file format"
-
-#define WTYPE_WAYPOINT 0 // Waypoint of unspecified type
-#define WTYPE_AIRPORT 1 // Typical assignment for medium sized airports
-#define WTYPE_MAJORAIRPORT 2 // Typical assignment for large and international airports
-#define WTYPE_SEAPLANEBASE 3
-#define WTYPE_AIRFIELD 4 // Typical assignment for smaller municipal airfields, glider fields etc
-#define WTYPE_PRIVATEAIRFIELD 5
-#define WTYPE_ULTRALIGHTFIELD 6
-#define WTYPE_INTERSECTION 7 // (reporting point, boundary crossing)
-#define WTYPE_HELIPORT 8
-#define WTYPE_TACAN 9
-#define WTYPE_NDBDME 10
-#define WTYPE_NDB 11
-#define WTYPE_VORDME 12
-#define WTYPE_VORTAC 13
-#define WTYPE_FANMARKER 14
-#define WTYPE_VOR 15
-#define WTYPE_REPPT 16
-#define WTYPE_LFR 17
-#define WTYPE_UHFNDB 18
-#define WTYPE_MNDB 19
-#define WTYPE_MNDBDME 20
-#define WTYPE_LOM 21
-#define WTYPE_LMM 22
-#define WTYPE_LOCSDF 23
-#define WTYPE_MLSISMLS 24
-#define WTYPE_OTHERNAV 25 // Navaid not falling into any of the above types
-#define WTYPE_ALTITUDECHANGE 26 // Location at which altitude should be changed
-
-union wpt_data {
- int32_t wp_altitude; // Waypoint type 0-6,8: waypoint altitude in feet
- int32_t tg_altitude; // Waypoint type 26: target altitude in feet
- uint32_t frequency; // Waypoint type 9-25: freq in steps of 1000Hz (118Mhz = 180000)
- int32_t dummy; // waypoint type 7, unused
-};
-
-struct enigma_wpt {
- int32_t latitude;
- int32_t longitude;
- union wpt_data data;
- uint8_t waypoint_type;
- uint8_t shortname_len; // number of used characters in shortname
- char shortname[6]; // ASCII, unused characters are "don't care" values
- uint8_t longname_len; // number of used characters in longname
- char longname[27]; // ASCII, unused characters are "don't care" values
-};
-
-static gbfile* file_in, *file_out;
-
-static void
-rd_init(const QString& fname)
-{
- file_in = gbfopen_le(fname, "rb", MYNAME);
-}
-
-static int32_t decToEnigmaPosition(double val)
-{
- int degrees = fabs(val);
- double frac = fabs(val) - degrees;
- int enigmadeg = degrees * 180000;
- int enigmafrac = 180000 * frac;
- int sign = (val < 0) ? -1 : +1;
- return sign * (enigmadeg + enigmafrac);
-}
-
-static float enigmaPositionToDec(int32_t val)
-{
- int deg = abs(val) / 180000;
- int enigmafrac = abs(val) % 180000;
- double frac = (double)enigmafrac / 180000;
- int sign = (val < 0) ? -1 : +1;
- return sign * (deg + frac);
-}
-
-static void
-data_read()
-{
- enigma_wpt ewpt;
- auto* route = new route_head;
- route_add_head(route);
-
- while (1 == gbfread(&ewpt, sizeof(ewpt), 1, file_in)) {
- auto* wpt = new Waypoint;
- wpt->latitude = enigmaPositionToDec(le_read32(&ewpt.latitude));
- wpt->longitude = enigmaPositionToDec(le_read32(&ewpt.longitude));
- char*sn = xstrndup(ewpt.shortname, ewpt.shortname_len);
- wpt->shortname = sn;
- xfree(sn);
-
- char* ds = xstrndup(ewpt.longname, ewpt.longname_len);
- wpt->description = ds;
- xfree(ds);
-
- switch (ewpt.waypoint_type) {
- case WTYPE_WAYPOINT: // 0
- case WTYPE_AIRPORT: // 1
- case WTYPE_MAJORAIRPORT: // 2
- case WTYPE_SEAPLANEBASE: // 3
- case WTYPE_AIRFIELD: // 4
- case WTYPE_PRIVATEAIRFIELD: // 5
- case WTYPE_ULTRALIGHTFIELD: // 6
- case WTYPE_HELIPORT: // 8
- // waypoint altitude
- wpt->altitude = FEET_TO_METERS(le_read32(&ewpt.data.wp_altitude) - 1000);
- break;
- case WTYPE_ALTITUDECHANGE: // 26
- // target altitude
- wpt->altitude = FEET_TO_METERS(le_read32(&ewpt.data.tg_altitude) - 1000);
- break;
- case WTYPE_INTERSECTION: // 7
- // unused
- break;
- default:
- // frequency
- // wpt->frequency = wpt.le_readu32(ewpt.data.frequency);
- ;
- }
- route_add_wpt(route, wpt);
- }
-}
-
-static void
-rd_deinit()
-{
- gbfclose(file_in);
-}
-
-static void
-wr_init(const QString& fname)
-{
- file_out = gbfopen_le(fname, "wb", MYNAME);
-}
-
-#ifndef min
-#define min(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-#ifndef max
-#define max(a,b) (((a) > (b)) ? (a) : (b))
-#endif
-
-static void
-enigma_waypt_disp(const Waypoint* wpt)
-{
- enigma_wpt ewpt;
-
- memset(&ewpt, 0, sizeof(ewpt));
-
- le_write32(&ewpt.latitude, decToEnigmaPosition(wpt->latitude));
- le_write32(&ewpt.longitude, decToEnigmaPosition(wpt->longitude));
- ewpt.waypoint_type = WTYPE_WAYPOINT;
- if (wpt->altitude != unknown_alt) {
- le_write32(&ewpt.data.wp_altitude, lround(METERS_TO_FEET(wpt->altitude)) + 1000);
- }
- if (wpt->shortname != nullptr) {
- ewpt.shortname_len = (uint8_t) min(6, strlen(CSTRc(wpt->shortname)));
- memcpy(ewpt.shortname, CSTRc(wpt->shortname), ewpt.shortname_len);
- }
- if (wpt->description != nullptr) {
- ewpt.longname_len = (uint8_t) min(27, strlen(CSTRc(wpt->description)));
- memcpy(ewpt.longname, CSTRc(wpt->description), ewpt.longname_len);
- }
- gbfwrite(&ewpt, sizeof(ewpt), 1, file_out);
-}
-
-static void
-data_write()
-{
- route_disp_all(nullptr, nullptr, enigma_waypt_disp);
-}
-
-static void
-wr_deinit()
-{
- gbfclose(file_out);
-}
-
-ff_vecs_t enigma_vecs = {
- ff_type_file,
- {
- ff_cap_none, /* waypoints */
- ff_cap_none, /* tracks */
- (ff_cap)(ff_cap_read | ff_cap_write) /* routes */
- },
- rd_init,
- wr_init,
- rd_deinit,
- wr_deinit,
- data_read,
- data_write,
- nullptr,
- nullptr,
- CET_CHARSET_ASCII, 0, /* CET-REVIEW */
- NULL_POS_OPS
-};
<file>style/cup.style</file>
<file>style/custom.style</file>
<file>style/dna.style</file>
- <file>style/flysight.style</file>
- <file>style/fugawi.style</file>
<file>style/garmin301.style</file>
<file>style/garmin_g1000.style</file>
<file>style/garmin_poi.style</file>
+++ /dev/null
-No,Latitude,Longitude,Name,Description\r
-1,42.438878,-71.119277,"5066","5066"\r
-2,42.439227,-71.119689,"5067","5067"\r
-3,42.438917,-71.116146,"5096","5096"\r
-4,42.443904,-71.122044,"5142","5142"\r
-5,42.447298,-71.121447,"5156","5156"\r
-6,42.454873,-71.125094,"5224","5224"\r
-7,42.459079,-71.124988,"5229","5229"\r
-8,42.456979,-71.124474,"5237","5237"\r
-9,42.454401,-71.120990,"5254","5254"\r
-10,42.451442,-71.121746,"5258","5258"\r
-11,42.454404,-71.120660,"5264","5264"\r
-12,42.457761,-71.121045,"526708","526708"\r
-13,42.457089,-71.120313,"526750","526750"\r
-14,42.456592,-71.119676,"527614","527614"\r
-15,42.456252,-71.119356,"527631","527631"\r
-16,42.458148,-71.119135,"5278","5278"\r
-17,42.459377,-71.117693,"5289","5289"\r
-18,42.464183,-71.119828,"5374FIRE","5374FIRE"\r
-19,42.465650,-71.119399,"5376","5376"\r
-20,42.439018,-71.114456,"6006","600698"\r
-21,42.438594,-71.114803,"6006BLUE","6006BLUE"\r
-22,42.436757,-71.113223,"6014MEADOW","6014MEADOW"\r
-23,42.441754,-71.113220,"6029","6029"\r
-24,42.436243,-71.109075,"6053","6053"\r
-25,42.439250,-71.107500,"6066","6066"\r
-26,42.439764,-71.107582,"6067","6067"\r
-27,42.434766,-71.105874,"6071","6071"\r
-28,42.433304,-71.106599,"6073","6073"\r
-29,42.437338,-71.104772,"6084","6084"\r
-30,42.442196,-71.110975,"6130","6130"\r
-31,42.442981,-71.111441,"6131","6131"\r
-32,42.444773,-71.108882,"6153","6153"\r
-33,42.443592,-71.106301,"6171","6171"\r
-34,42.447804,-71.106624,"6176","6176"\r
-35,42.448448,-71.106158,"6177","6177"\r
-36,42.453415,-71.106783,"6272","6272"\r
-37,42.453434,-71.107253,"6272","6272"\r
-38,42.458298,-71.106771,"6278","6278"\r
-39,42.451430,-71.105413,"6280","6280"\r
-40,42.453845,-71.105206,"6283","6283"\r
-41,42.459986,-71.106170,"6289","6289"\r
-42,42.457616,-71.105116,"6297","6297"\r
-43,42.467110,-71.113574,"6328","6328"\r
-44,42.464202,-71.109863,"6354","6354"\r
-45,42.466459,-71.110067,"635722","635722"\r
-46,42.466557,-71.109410,"635783","635783"\r
-47,42.463495,-71.107117,"6373","6373"\r
-48,42.401051,-71.110241,"6634","6634"\r
-49,42.432621,-71.106532,"6979","6979"\r
-50,42.431033,-71.107883,"6997","6997"\r
-51,42.465687,-71.107360,"BEAR HILL","Bear Hill Tower"\r
-52,42.430950,-71.107628,"BELLEVUE","Bellevue Parking Lot"\r
-53,42.438666,-71.114079,"6016","Bike Loop Connector"\r
-54,42.456469,-71.124651,"5236BRIDGE","Bridge"\r
-55,42.465759,-71.119815,"5376BRIDGE","Bridge"\r
-56,42.442993,-71.105878,"6181CROSS","Crossing"\r
-57,42.435472,-71.109664,"6042CROSS","Crossing"\r
-58,42.458516,-71.103646,"DARKHOLLPO","Dark Hollow Pond"\r
-59,42.443109,-71.112675,"6121DEAD","Dead End"\r
-60,42.449866,-71.119298,"5179DEAD","Dead End"\r
-61,42.459629,-71.116524,"5299DEAD","Dead End"\r
-62,42.465485,-71.119148,"5376DEAD","Dead End"\r
-63,42.462776,-71.109986,"6353DEAD","Dead End"\r
-64,42.446793,-71.108784,"6155DEAD","Dead End"\r
-65,42.451204,-71.126602,"GATE14","Gate 14"\r
-66,42.458499,-71.122078,"GATE16","Gate 16"\r
-67,42.459376,-71.119238,"GATE17","Gate 17"\r
-68,42.466353,-71.119240,"GATE19","Gate 19"\r
-69,42.468655,-71.107697,"GATE21","Gate 21"\r
-70,42.456718,-71.102973,"GATE24","Gate 24"\r
-71,42.430847,-71.107690,"GATE5","Gate 5"\r
-72,42.431240,-71.109236,"GATE6","Gate 6"\r
-73,42.439502,-71.106556,"6077LOGS","Log Crossing"\r
-74,42.449765,-71.122320,"5148NANEPA","Nanepashemet Road Crossing"\r
-75,42.457388,-71.119845,"5267OBSTAC","Obstacle"\r
-76,42.434980,-71.109942,"PANTHRCAVE","Panther Cave"\r
-77,42.453256,-71.121211,"5252PURPLE","Purple Rock Hill"\r
-78,42.457734,-71.117481,"5287WATER","Reservoir"\r
-79,42.459278,-71.124574,"5239ROAD","Road"\r
-80,42.458782,-71.118991,"5278ROAD","Road"\r
-81,42.439993,-71.120925,"5058ROAD","Road Crossing"\r
-82,42.453415,-71.106782,"SHEEPFOLD","Sheepfold Parking Lot"\r
-83,42.455956,-71.107483,"SOAPBOX","Soap Box Derby Track"\r
-84,42.465913,-71.119328,"5376STREAM","Stream Crossing"\r
-85,42.445359,-71.122845,"5144SUMMIT","Summit"\r
-86,42.441727,-71.121676,"5150TANK","Water Tank"\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<gpx version="1.0" creator="GPSBabel - https://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
- <time>1970-01-01T00:00:00Z</time>
- <bounds minlat="51.305278778" minlon="-9.523783684" maxlat="53.423606873" maxlon="4.390666485"/>
- <rte>
- <rtept lat="52.180873871" lon="-9.523783684">
- <ele>34.138</ele>
- <name>EIKY</name>
- <cmt>KERRY</cmt>
- <desc>KERRY</desc>
- </rtept>
- <rtept lat="52.701972961" lon="-8.924821854">
- <ele>14.021</ele>
- <name>EINN</name>
- <cmt>SHANNON</cmt>
- <desc>SHANNON</desc>
- </rtept>
- <rtept lat="53.423606873" lon="-6.302777767">
- <name>DAP(EI</name>
- <cmt>DUBLIN</cmt>
- <desc>DUBLIN</desc>
- </rtept>
- <rtept lat="51.305278778" lon="4.390666485">
- <ele>3.048</ele>
- <name>EBHN</name>
- <cmt>Hoevenen</cmt>
- <desc>Hoevenen</desc>
- </rtept>
- </rte>
-</gpx>
gpl gpl DeLorme GPL
saplus DeLorme Street Atlas Plus
saroute anr DeLorme Street Atlas Route
-destinator_itn dat Destinator Itineraries (.dat)
-destinator_poi dat Destinator Points of Interest (.dat)
-destinator_trl dat Destinator TrackLogs (.dat)
-easygps loc EasyGPS binary format
exif jpg Embedded Exif-GPS data (.jpg)
-energympro cpo Energympro GPS training watch
-enigma ert Enigma binary waypoint file (.ert)
shape shp ESRI shapefile
-f90g map F90G Automobile DVR GPS log file
igc FAI/IGC Flight Recorder Data Format
garmin_fit fit Flexible and Interoperable Data Transfer (FIT) Activity file
-flysight csv FlySight GPS File
gpssim gpssim Franson GPSGate Simulation
-fugawi txt Fugawi
garmin301 Garmin 301 Custom position and heartrate
garmin_g1000 csv Garmin G1000 datalog input filter file
glogbook xml Garmin Logbook XML
file gpl gpl DeLorme GPL
file saplus DeLorme Street Atlas Plus
file saroute anr DeLorme Street Atlas Route
-file destinator_itn dat Destinator Itineraries (.dat)
-file destinator_poi dat Destinator Points of Interest (.dat)
-file destinator_trl dat Destinator TrackLogs (.dat)
-file easygps loc EasyGPS binary format
file exif jpg Embedded Exif-GPS data (.jpg)
-file energympro cpo Energympro GPS training watch
-file enigma ert Enigma binary waypoint file (.ert)
file shape shp ESRI shapefile
-file f90g map F90G Automobile DVR GPS log file
file igc FAI/IGC Flight Recorder Data Format
file garmin_fit fit Flexible and Interoperable Data Transfer (FIT) Activity file
-file flysight csv FlySight GPS File
file gpssim gpssim Franson GPSGate Simulation
-file fugawi txt Fugawi
file garmin301 Garmin 301 Custom position and heartrate
file garmin_g1000 csv Garmin G1000 datalog input filter file
file glogbook xml Garmin Logbook XML
file --rw-- gpl gpl DeLorme GPL
file rw---- saplus DeLorme Street Atlas Plus
file --r--- saroute anr DeLorme Street Atlas Route
-file ----rw destinator_itn dat Destinator Itineraries (.dat)
-file rw---- destinator_poi dat Destinator Points of Interest (.dat)
-file --rw-- destinator_trl dat Destinator TrackLogs (.dat)
-file rw---- easygps loc EasyGPS binary format
file rw---- exif jpg Embedded Exif-GPS data (.jpg)
-file --r--- energympro cpo Energympro GPS training watch
-file ----rw enigma ert Enigma binary waypoint file (.ert)
file rwrwrw shape shp ESRI shapefile
-file --r--- f90g map F90G Automobile DVR GPS log file
file --rwrw igc FAI/IGC Flight Recorder Data Format
file -wrw-- garmin_fit fit Flexible and Interoperable Data Transfer (FIT) Activity file
-file rw---- flysight csv FlySight GPS File
file -w-w-w gpssim gpssim Franson GPSGate Simulation
-file rw---- fugawi txt Fugawi
file rw---- garmin301 Garmin 301 Custom position and heartrate
file --rw-- garmin_g1000 csv Garmin G1000 datalog input filter file
file --rw-- glogbook xml Garmin Logbook XML
option saroute times Synthesize track times boolean https://www.gpsbabel.org/WEB_DOC_DIR/fmt_saroute.html#fmt_saroute_o_times
-file ----rw destinator_itn dat Destinator Itineraries (.dat) destinator_itn
- https://www.gpsbabel.org/WEB_DOC_DIR/fmt_destinator_itn.html
-file rw---- destinator_poi dat Destinator Points of Interest (.dat) destinator_poi
- https://www.gpsbabel.org/WEB_DOC_DIR/fmt_destinator_poi.html
-file --rw-- destinator_trl dat Destinator TrackLogs (.dat) destinator_trl
- https://www.gpsbabel.org/WEB_DOC_DIR/fmt_destinator_trl.html
-file rw---- easygps loc EasyGPS binary format easygps
- https://www.gpsbabel.org/WEB_DOC_DIR/fmt_easygps.html
file rw---- exif jpg Embedded Exif-GPS data (.jpg) exif
https://www.gpsbabel.org/WEB_DOC_DIR/fmt_exif.html
option exif filename Set waypoint name to source filename boolean Y https://www.gpsbabel.org/WEB_DOC_DIR/fmt_exif.html#fmt_exif_o_filename
option exif overwrite !OVERWRITE! the original file. Default=N boolean N https://www.gpsbabel.org/WEB_DOC_DIR/fmt_exif.html#fmt_exif_o_overwrite
-file --r--- energympro cpo Energympro GPS training watch energympro
- https://www.gpsbabel.org/WEB_DOC_DIR/fmt_energympro.html
-option energympro timezone Time zone ID string https://www.gpsbabel.org/WEB_DOC_DIR/fmt_energympro.html#fmt_energympro_o_timezone
-
-file ----rw enigma ert Enigma binary waypoint file (.ert) enigma
- https://www.gpsbabel.org/WEB_DOC_DIR/fmt_enigma.html
file rwrwrw shape shp ESRI shapefile shape
https://www.gpsbabel.org/WEB_DOC_DIR/fmt_shape.html
option shape name Source for name field in .dbf string 0 https://www.gpsbabel.org/WEB_DOC_DIR/fmt_shape.html#fmt_shape_o_name
option shape url Source for URL field in .dbf string 0 https://www.gpsbabel.org/WEB_DOC_DIR/fmt_shape.html#fmt_shape_o_url
-file --r--- f90g map F90G Automobile DVR GPS log file f90g
- https://www.gpsbabel.org/WEB_DOC_DIR/fmt_f90g.html
file --rwrw igc FAI/IGC Flight Recorder Data Format igc
https://www.gpsbabel.org/WEB_DOC_DIR/fmt_igc.html
option igc timeadj (integer sec or 'auto') Barograph to GPS time diff string https://www.gpsbabel.org/WEB_DOC_DIR/fmt_igc.html#fmt_igc_o_timeadj
option garmin_fit recoverymode Attempt to recovery data from corrupt file boolean https://www.gpsbabel.org/WEB_DOC_DIR/fmt_garmin_fit.html#fmt_garmin_fit_o_recoverymode
-file rw---- flysight csv FlySight GPS File xcsv
- https://www.gpsbabel.org/WEB_DOC_DIR/fmt_flysight.html
-option flysight snlen Max synthesized shortname length integer 1 https://www.gpsbabel.org/WEB_DOC_DIR/fmt_flysight.html#fmt_flysight_o_snlen
-
-option flysight snwhite Allow whitespace synth. shortnames boolean https://www.gpsbabel.org/WEB_DOC_DIR/fmt_flysight.html#fmt_flysight_o_snwhite
-
-option flysight snupper UPPERCASE synth. shortnames boolean https://www.gpsbabel.org/WEB_DOC_DIR/fmt_flysight.html#fmt_flysight_o_snupper
-
-option flysight snunique Make synth. shortnames unique boolean https://www.gpsbabel.org/WEB_DOC_DIR/fmt_flysight.html#fmt_flysight_o_snunique
-
-option flysight urlbase Basename prepended to URL on output string https://www.gpsbabel.org/WEB_DOC_DIR/fmt_flysight.html#fmt_flysight_o_urlbase
-
-option flysight prefer_shortnames Use shortname instead of description boolean https://www.gpsbabel.org/WEB_DOC_DIR/fmt_flysight.html#fmt_flysight_o_prefer_shortnames
-
-option flysight datum GPS datum (def. WGS 84) string https://www.gpsbabel.org/WEB_DOC_DIR/fmt_flysight.html#fmt_flysight_o_datum
-
file -w-w-w gpssim gpssim Franson GPSGate Simulation gpssim
https://www.gpsbabel.org/WEB_DOC_DIR/fmt_gpssim.html
option gpssim wayptspd Default speed for waypoints (knots/hr) float https://www.gpsbabel.org/WEB_DOC_DIR/fmt_gpssim.html#fmt_gpssim_o_wayptspd
option gpssim split Split input into separate files boolean 0 https://www.gpsbabel.org/WEB_DOC_DIR/fmt_gpssim.html#fmt_gpssim_o_split
-file rw---- fugawi txt Fugawi xcsv
- https://www.gpsbabel.org/WEB_DOC_DIR/fmt_fugawi.html
-option fugawi snlen Max synthesized shortname length integer 1 https://www.gpsbabel.org/WEB_DOC_DIR/fmt_fugawi.html#fmt_fugawi_o_snlen
-
-option fugawi snwhite Allow whitespace synth. shortnames boolean https://www.gpsbabel.org/WEB_DOC_DIR/fmt_fugawi.html#fmt_fugawi_o_snwhite
-
-option fugawi snupper UPPERCASE synth. shortnames boolean https://www.gpsbabel.org/WEB_DOC_DIR/fmt_fugawi.html#fmt_fugawi_o_snupper
-
-option fugawi snunique Make synth. shortnames unique boolean https://www.gpsbabel.org/WEB_DOC_DIR/fmt_fugawi.html#fmt_fugawi_o_snunique
-
-option fugawi urlbase Basename prepended to URL on output string https://www.gpsbabel.org/WEB_DOC_DIR/fmt_fugawi.html#fmt_fugawi_o_urlbase
-
-option fugawi prefer_shortnames Use shortname instead of description boolean https://www.gpsbabel.org/WEB_DOC_DIR/fmt_fugawi.html#fmt_fugawi_o_prefer_shortnames
-
-option fugawi datum GPS datum (def. WGS 84) string https://www.gpsbabel.org/WEB_DOC_DIR/fmt_fugawi.html#fmt_fugawi_o_datum
-
file rw---- garmin301 Garmin 301 Custom position and heartrate xcsv
https://www.gpsbabel.org/WEB_DOC_DIR/fmt_garmin301.html
option garmin301 snlen Max synthesized shortname length integer 1 https://www.gpsbabel.org/WEB_DOC_DIR/fmt_garmin301.html#fmt_garmin301_o_snlen
+++ /dev/null
-# Latitude, Longitude and UTM coordinates are in WGS84 datum
-#
-# Every set of data contains the following:
-#
-# Waypoint name
-# Waypoint comment
-# Waypoint description
-# Latitude in Degree and decimals (southern hemisphere has neg. degrees)
-# Longitude in degree and decimals (neg. numbers: west of Greenwich)
-# Height in meters
-GCEBB,Mountain Bike Heaven by susy1313,,35.9720333,-87.1347000,0.0
-GC1A37,The Troll by a182pilot & Family,,36.0906833,-86.6795500,0.0
-GC1C2B,Dive Bomber by JoGPS & family,,35.9962667,-86.6201167,0.0
-GC25A9,FOSTER by JoGPS & Family,,36.0384833,-86.6486167,0.0
-GC2723,Logan Lighthouse by JoGps & Family,,36.1121833,-86.7417667,0.0
-GC2B71,Ganier Cache by Susy1313,,36.0640833,-86.7905167,0.0
-GC309F,Shy's Hill by FireFighterEng33,,36.0877667,-86.8097333,0.0
-GC317A,GittyUp by JoGPS / Warner Parks,,36.0575000,-86.8920000,0.0
-GC317D,Inlighting by JoGPS / Warner Parks,,36.0828000,-86.8672833,0.0
+++ /dev/null
-# Latitude, Longitude and UTM coordinates are in WGS84 datum
-#
-# Every set of data contains the following:
-#
-# Waypoint name
-# Waypoint comment
-# Waypoint description
-# Latitude in Degree and decimals (southern hemisphere has neg. degrees)
-# Longitude in degree and decimals (neg. numbers: west of Greenwich)
-# Height in meters [optional when importing, always present when exporting: Date (GMT) as ISO YYYYMMDD, Time of the day relative to the date as HHMMSS
-GCEBB,Mountain Bike Heaven by susy1313,,35.9720333,-87.1347000,0.0 ,19700101,000000
-GC1A37,The Troll by a182pilot & Family,,36.0906833,-86.6795500,0.0 ,19700101,000000
-GC1C2B,Dive Bomber by JoGPS & family,,35.9962667,-86.6201167,0.0 ,19700101,000000
-GC25A9,FOSTER by JoGPS & Family,,36.0384833,-86.6486167,0.0 ,19700101,000000
-GC2723,Logan Lighthouse by JoGps & Family,,36.1121833,-86.7417667,0.0 ,19700101,000000
-GC2B71,Ganier Cache by Susy1313,,36.0640833,-86.7905167,0.0 ,19700101,000000
-GC309F,Shy's Hill by FireFighterEng33,,36.0877667,-86.8097333,0.0 ,19700101,000000
-GC317A,GittyUp by JoGPS / Warner Parks,,36.0575000,-86.8920000,0.0 ,19700101,000000
-GC317D,Inlighting by JoGPS / Warner Parks,,36.0828000,-86.8672833,0.0 ,19700101,000000
+++ /dev/null
-# Latitude, Longitude and UTM coordinates are in WGS84 datum
-#
-# Every set of data contains the following:
-#
-# Waypoint name
-# Waypoint comment
-# Waypoint description
-# Latitude in Degree and decimals (southern hemisphere has neg. degrees)
-# Longitude in degree and decimals (neg. numbers: west of Greenwich)
-# Height in meters [optional when importing, always present when exporting: Date (GMT) as ISO YYYYMMDD, Time of the day relative to the date as HHMMSS
-GCEBB,Mountain Bike Heaven by susy1313,,35.9720333,-87.1347000,0.0 ,19700101,000000
-GC1A37,The Troll by a182pilot & Family,,36.0906833,-86.6795500,0.0 ,19700101,000000
-GC1C2B,Dive Bomber by JoGPS & family,,35.9962667,-86.6201167,0.0 ,19700101,110304
-GC25A9,FOSTER by JoGPS & Family,,36.0384833,-86.6486167,0.0 ,19700101,130405
-GC2723,Logan Lighthouse by JoGps & Family,,36.1121833,-86.7417667,0.0 ,20050102,000000
-GC2B71,Ganier Cache by Susy1313,,36.0640833,-86.7905167,0.0 ,20050102,000001
+++ /dev/null
-# Latitude, Longitude and UTM coordinates are in WGS84 datum
-#
-# Every set of data contains the following:
-#
-# Waypoint name
-# Waypoint comment
-# Waypoint description
-# Latitude in Degree and decimals (southern hemisphere has neg. degrees)
-# Longitude in degree and decimals (neg. numbers: west of Greenwich)
-# Height in meters [optional when importing, always present when exporting: Date (GMT) as ISO YYYYMMDD, Time of the day relative to the date as HHMMSS
-GCEBB,Mountain Bike Heaven by susy1313,,35.9720333,-87.1347000,0.0
-GC1A37,The Troll by a182pilot & Family,,36.0906833,-86.6795500,0.0 ,19700101
-GC1C2B,Dive Bomber by JoGPS & family,,35.9962667,-86.6201167,0.0 ,,110304
-GC25A9,FOSTER by JoGPS & Family,,36.0384833,-86.6486167,0.0 ,19700101,130405
-GC2723,Logan Lighthouse by JoGps & Family,,36.1121833,-86.7417667,0.0 ,20050102,000000
-GC2B71,Ganier Cache by Susy1313,,36.0640833,-86.7905167,0.0 ,20050102,000001
split (0/1) Split into multiple routes at turns
controls Read control points as waypoint/route/none
times (0/1) Synthesize track times
- destinator_itn Destinator Itineraries (.dat)
- destinator_poi Destinator Points of Interest (.dat)
- destinator_trl Destinator TrackLogs (.dat)
- easygps EasyGPS binary format
exif Embedded Exif-GPS data (.jpg)
filename (0/1) Set waypoint name to source filename
frame Time-frame (in seconds)
name Locate waypoint for tagging by this name
overwrite (0/1) !OVERWRITE! the original file. Default=N
- energympro Energympro GPS training watch
- timezone Time zone ID
- enigma Enigma binary waypoint file (.ert)
shape ESRI shapefile
name Source for name field in .dbf
url Source for URL field in .dbf
- f90g F90G Automobile DVR GPS log file
igc FAI/IGC Flight Recorder Data Format
timeadj (integer sec or 'auto') Barograph to GPS time diff
garmin_fit Flexible and Interoperable Data Transfer (FIT) Act
allpoints (0/1) Read all points even if latitude or longitude is m
recoverymode (0/1) Attempt to recovery data from corrupt file
- flysight FlySight GPS File
- snlen Max synthesized shortname length
- snwhite (0/1) Allow whitespace synth. shortnames
- snupper (0/1) UPPERCASE synth. shortnames
- snunique (0/1) Make synth. shortnames unique
- urlbase Basename prepended to URL on output
- prefer_shortnames (0/1) Use shortname instead of description
- datum GPS datum (def. WGS 84)
gpssim Franson GPSGate Simulation
wayptspd Default speed for waypoints (knots/hr)
split (0/1) Split input into separate files
- fugawi Fugawi
- snlen Max synthesized shortname length
- snwhite (0/1) Allow whitespace synth. shortnames
- snupper (0/1) UPPERCASE synth. shortnames
- snunique (0/1) Make synth. shortnames unique
- urlbase Basename prepended to URL on output
- prefer_shortnames (0/1) Use shortname instead of description
- datum GPS datum (def. WGS 84)
garmin301 Garmin 301 Custom position and heartrate
snlen Max synthesized shortname length
snwhite (0/1) Allow whitespace synth. shortnames
+++ /dev/null
-# Format: FlySight
-# Author: LukeH
-# Date: 10/10/10
-
-DESCRIPTION FlySight GPS File
-EXTENSION csv
-
-# FILE LAYOUT DEFINITIIONS:
-FIELD_DELIMITER COMMA
-RECORD_DELIMITER NEWLINE
-BADCHARS ,"
-
-PROLOGUE time lat lon hMSL velN velE velD hAcc vAcc sAcc gpsFix numSV
-PROLOGUE
-
-# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE:
-IFIELD ISO_TIME, "", "%s" # Date & time
-IFIELD LAT_DECIMAL, "", "%f" # Latitude
-IFIELD LON_DECIMAL, "", "%f" # Longitude
-IFIELD ALT_METERS, "", "%.0f" # Altitude above MSL (m)
-IFIELD IGNORE, "", "%s" # Velocity north (m/s)
-IFIELD IGNORE, "", "%s" # Velocity east (m/s)
-IFIELD IGNORE, "", "%s" # Velocity down (m/s)
-IFIELD IGNORE, "", "%s" # Horizontal accuracy (m)
-IFIELD IGNORE, "", "%s" # Vertical accuracy (m)
-IFIELD IGNORE, "", "%s" # Speed accuracy (m/s)
-IFIELD GPS_FIX, "", "%s" # GPS fix type
-IFIELD GPS_SAT, "", "%d" # Number of satellites used in fix
+++ /dev/null
-# fugawi XCSV style file
-#
-# Format: Fugawi
-# Author: Robert Lipe, Patrick Ohly
-# Date: 07/24/2005
-#
-#
-
-DESCRIPTION Fugawi
-EXTENSION txt
-SHORTLEN 10
-
-#
-# FILE LAYOUT DEFINITIIONS:
-#
-FIELD_DELIMITER COMMA
-RECORD_DELIMITER NEWLINE
-BADCHARS COMMA
-
-PROLOGUE \# Latitude, Longitude and UTM coordinates are in WGS84 datum
-PROLOGUE \#
-PROLOGUE \# Every set of data contains the following:
-PROLOGUE \#
-PROLOGUE \# Waypoint name
-PROLOGUE \# Waypoint comment
-PROLOGUE \# Waypoint description
-PROLOGUE \# Latitude in Degree and decimals (southern hemisphere has neg. degrees)
-PROLOGUE \# Longitude in degree and decimals (neg. numbers: west of Greenwich)
-PROLOGUE \# Height in meters [optional when importing, always present when exporting: Date (GMT) as ISO YYYYMMDD, Time of the day relative to the date as HHMMSS
-
-#
-# INDIVIDUAL DATA FIELDS, IN ORDER OF APPEARANCE:
-#
-IFIELD SHORTNAME, "", "%s"
-IFIELD DESCRIPTION, "", "%s"
-IFIELD NOTES, "", "%s"
-IFIELD LAT_DECIMAL, "", "%-.7f"
-IFIELD LON_DECIMAL, "", "%-.7f"
-IFIELD ALT_METERS, "", "%-7.1f"
-IFIELD GMT_TIME, "", "%Y%m%d"
-IFIELD HMSG_TIME, "", "%02d%02d%02d"
+++ /dev/null
-
-# Destinator POI
-gpsbabel -i gpx -f ${REFERENCE}/expertgps.gpx -o destinator_poi -F ${TMPDIR}/destinator_poi.dat
-gpsbabel -i destinator_poi -f ${TMPDIR}/destinator_poi.dat -w -o unicsv,utc=0 -F ${TMPDIR}/destinator_poi.txt
-compare ${REFERENCE}/destinator_poi.txt ${TMPDIR}/destinator_poi.txt
-
-# Destinator Itinerary
-gpsbabel -i gpx -f ${REFERENCE}/expertgps.gpx -o destinator_itn -F ${TMPDIR}/destinator_itn.dat
-gpsbabel -i destinator_itn -f ${TMPDIR}/destinator_itn.dat -r -o unicsv,utc=0 -F ${TMPDIR}/destinator_itn.txt
-compare ${REFERENCE}/route/destinator_itn.txt ${TMPDIR}/destinator_itn.txt
-
-# Destinator TrackLog
-gpsbabel -i nmea -f ${REFERENCE}/track/nmea+ms.txt -o destinator_trl -F ${TMPDIR}/destinator_trl.dat
-gpsbabel -i destinator_trl -f ${TMPDIR}/destinator_trl.dat -t -o unicsv,utc=0 -F ${TMPDIR}/destinator_trl.txt
-compare ${REFERENCE}/track/destinator_trl.txt ${TMPDIR}/destinator_trl.txt
-
+++ /dev/null
-
-#
-# EasyGPS. Another binary format.
-#
-rm -f ${TMPDIR}/easy.loc
-gpsbabel -i easygps -f ${REFERENCE}/easygps.loc -o easygps -F ${TMPDIR}/ez.loc
-gpsbabel -i easygps -f ${REFERENCE}/easygps.loc -o gpx -F ${TMPDIR}/ez1.gpx
-gpsbabel -i easygps -f ${TMPDIR}/ez.loc -o gpx -F ${TMPDIR}/ez2.gpx
-compare ${TMPDIR}/ez1.gpx ${TMPDIR}/ez2.gpx
-
+++ /dev/null
-#
-# Basic energympro tests (readonly)
-#
-rm -f ${TMPDIR}/energympro*
-gpsbabel -i energympro,timezone=UTC+02:00 -f ${REFERENCE}/track/energympro.cpo -o gpx,garminextensions -F ${TMPDIR}/energympro.gpx
-compare ${REFERENCE}/track/energympro.gpx ${TMPDIR}/energympro.gpx
+++ /dev/null
-
-#
-# MGL Enigma route file (.ert)
-#
-gpsbabel -i gpx -f ${REFERENCE}/enigma.gpx -o enigma -F ${TMPDIR}/enigma.ert
-compare ${REFERENCE}/enigma-gpsb.ert ${TMPDIR}/enigma.ert
-gpsbabel -i enigma -f ${REFERENCE}/enigma-pfms.ert -o gpx -F ${TMPDIR}/enigma.gpx
-compare ${REFERENCE}/enigma.gpx ${TMPDIR}/enigma.gpx
-
-# mglcentral20.ert was produced by MGL Central version 2.0.
-# don't care values in character string are evident,
-# which makes it impossible to compare "identical" enigma files.
-gpsbabel -i enigma -f ${REFERENCE}/mglcentral20.ert -o gpx -F ${TMPDIR}/mglcentral20.gpx
-compare ${REFERENCE}/mglcentral20.gpx ${TMPDIR}/mglcentral20.gpx
-
+++ /dev/null
-# F90G Automobile DVR GPS logging
-rm -f ${TMPDIR}/f90g.gpx
-gpsbabel -i f90g -f ${REFERENCE}/track/f90g-sample.map -o gpx -F ${TMPDIR}/f90g.gpx
-compare ${REFERENCE}/track/f90g-sample.gpx ${TMPDIR}/f90g.gpx
+++ /dev/null
-#
-# Fugawi test cases
-rm -f ${TMPDIR}/fugawi*
-gpsbabel -i fugawi -f ${REFERENCE}/fugawi.notime.txt -o fugawi -F ${TMPDIR}/fugawi1.txt
-compare ${REFERENCE}/fugawi.ref.txt ${TMPDIR}/fugawi1.txt
-gpsbabel -i geo -f ${REFERENCE}/geocaching.loc -o fugawi -F ${TMPDIR}/fugawi2.txt
-compare ${REFERENCE}/fugawi.ref.txt ${TMPDIR}/fugawi2.txt
-gpsbabel -i fugawi -f ${TMPDIR}/fugawi2.txt -o fugawi -F ${TMPDIR}/fugawi3.txt
-compare ${TMPDIR}/fugawi2.txt ${TMPDIR}/fugawi3.txt
-gpsbabel -i fugawi -f ${REFERENCE}/fugawi.time.txt -o fugawi -F ${TMPDIR}/fugawi4.txt
-compare ${REFERENCE}/fugawi.time.ref.txt ${TMPDIR}/fugawi4.txt
-gpsbabel -i gpx -f ${REFERENCE}/track/tracks.gpx -o fugawi -F ${TMPDIR}/fugawi5.txt
-compare ${REFERENCE}/track/fugawi.txt ${TMPDIR}/fugawi5.txt
#include "defs.h" // for arglist_t, ff_vecs_t, ff_cap, fatal, CSTR, ARGTYPE_TYPEMASK, case_ignore_strcmp, global_options, global_opts, warning, xfree, ARGTYPE_BOOL, ff_cap_read, ff_cap_write, ARGTYPE_HIDDEN, ff_type_internal, xstrdup, ARGTYPE_INT, ARGTYPE_REQUIRED, ARGTYPE_FLOAT
#include "dg-100.h" // for Dg100FileFormat, Dg100SerialFormat, Dg200FileFormat, Dg200SerialFormat
-#include "energympro.h" // for EnergymproFormat
#include "exif.h" // for ExifFormat
-#include "f90g_track.h" // for F90gTrackFormat
#include "format.h" // for Format
#include "garmin_fit.h" // for GarminFitFormat
#include "garmin_gpi.h" // for GarminGPIFormat
extern ff_vecs_t tpg_vecs;
extern ff_vecs_t tpo2_vecs;
extern ff_vecs_t tpo3_vecs;
-extern ff_vecs_t easygps_vecs;
extern ff_vecs_t saroute_vecs;
extern ff_vecs_t gpl_vecs;
extern ff_vecs_t igc_vecs;
extern ff_vecs_t xol_vecs;
extern ff_vecs_t navilink_vecs;
extern ff_vecs_t ik3d_vecs;
-extern ff_vecs_t destinator_poi_vecs;
-extern ff_vecs_t destinator_itn_vecs;
-extern ff_vecs_t destinator_trl_vecs;
extern ff_vecs_t igo8_vecs;
extern ff_vecs_t mapasia_tr7_vecs;
extern ff_vecs_t gnav_trl_vecs;
extern ff_vecs_t sbn_vecs;
extern ff_vecs_t mmo_vecs;
extern ff_vecs_t v900_vecs;
-extern ff_vecs_t enigma_vecs;
extern ff_vecs_t format_garmin_xt_vecs;
#endif // MAXIMAL_ENABLED
LegacyFormat tpg_fmt {tpg_vecs};
LegacyFormat tpo2_fmt {tpo2_vecs};
LegacyFormat tpo3_fmt {tpo3_vecs};
- LegacyFormat easygps_fmt {easygps_vecs};
LegacyFormat saroute_fmt {saroute_vecs};
#if SHAPELIB_ENABLED
ShapeFormat shape_fmt;
LegacyFormat navilink_fmt {navilink_vecs};
LegacyFormat ik3d_fmt {ik3d_vecs};
OsmFormat osm_fmt;
- LegacyFormat destinator_poi_fmt {destinator_poi_vecs};
- LegacyFormat destinator_itn_fmt {destinator_itn_vecs};
- LegacyFormat destinator_trl_fmt {destinator_trl_vecs};
ExifFormat exif_fmt;
LegacyFormat igo8_fmt {igo8_vecs};
HumminbirdFormat humminbird_fmt;
LegacyFormat sbn_fmt {sbn_vecs};
LegacyFormat mmo_fmt {mmo_vecs};
LegacyFormat v900_fmt {v900_vecs};
- LegacyFormat enigma_fmt {enigma_vecs};
SkytraqFormat skytraq_fmt;
TeletypeFormat teletype_fmt;
SkytraqfileFormat skytraq_ffmt;
LegacyFormat format_garmin_xt_fmt {format_garmin_xt_vecs};
GarminFitFormat format_fit_fmt;
MapbarTrackFormat mapbar_track_fmt;
- F90gTrackFormat f90g_track_fmt;
MapfactorFormat mapfactor_fmt;
- EnergymproFormat energympro_fmt;
MyNavFormat mynav_fmt;
GeoJsonFormat geojson_fmt;
GgvBinFormat ggv_bin_fmt;
"tpo",
nullptr,
},
- {
- &easygps_fmt,
- "easygps",
- "EasyGPS binary format",
- "loc",
- nullptr,
- },
{
&saroute_fmt,
"saroute",
"osm",
nullptr,
},
- {
- &destinator_poi_fmt,
- "destinator_poi",
- "Destinator Points of Interest (.dat)",
- "dat",
- nullptr,
- },
- {
- &destinator_itn_fmt,
- "destinator_itn",
- "Destinator Itineraries (.dat)",
- "dat",
- nullptr,
- },
- {
- &destinator_trl_fmt,
- "destinator_trl",
- "Destinator TrackLogs (.dat)",
- "dat",
- nullptr,
- },
{
&exif_fmt,
"exif",
nullptr,
nullptr,
},
- {
- &enigma_fmt,
- "enigma",
- "Enigma binary waypoint file (.ert)",
- "ert",
- nullptr,
- },
{
&skytraq_fmt,
"skytraq",
"trk",
nullptr,
},
- {
- &f90g_track_fmt,
- "f90g",
- "F90G Automobile DVR GPS log file",
- "map",
- nullptr,
- },
{
&mapfactor_fmt,
"mapfactor",
"xml",
nullptr,
},
- {
- &energympro_fmt,
- "energympro",
- "Energympro GPS training watch",
- "cpo",
- nullptr,
- },
{
&mynav_fmt,
"mynav",
+++ /dev/null
-<para>
- Support for <productname>Destinator</productname> itinerary files.
-</para>
-<para>
- These have (mostly) extension .dat and are binary files. The file structure is undocumented
- and so this format was reverse engineered from some .dat files.
- At this time we can read and write name, comment and the coordinates of the route points.
-</para>
-<para>
- <productname>Destinator</productname> by
- <ulink url="http://www.destinatortechnologies.net">Destinator Technologies</ulink>
- is a software for PNDs, Smartphones and PDAs.
-</para>
-<para>
- <userinput>
- gpsbabel -i destinator_itn -f from_A_to_B.dat -o gpx -F from_A_to_B.gpx
- </userinput>
-</para>
+++ /dev/null
-<para>
- Support for <productname>Destinator</productname> binary POI files (.dat).
-</para>
-<para>
- The basic information was found at <ulink url="http://mozoft.com/d3log.html">mozoft.com</ulink>.
- GPSBabel can read and write all fields described at this document. Please note that 'house number' isn't
- supported as a separate field. This field, if available in any source file, will be stored together with 'street'
- into GSPBabel's internal 'address' field.
-</para>
-<para>
- <productname>Destinator</productname> by
- <ulink url="http://www.destinatortechnologies.net">Destinator Technologies</ulink>
- is a software for PNDs, Smartphones and PDAs.
-</para>
-<para>
- <userinput>
- gpsbabel -i destinator_poi -f interesting_places.dat -o gpx -F interesting_places.gpx
- </userinput>
-</para>
+++ /dev/null
-<para>
- Support for <productname>Destinator</productname> binary tracklogs (.dat).
-</para>
-<para>
- The basic information was found at <ulink url="http://mozoft.com/d3log.html">mozoft.com</ulink>.
- In addition to the standard GPS track data of coordinates and timestamp, this format also stores the
- position fix and the number of satellites seen during recording.
-</para>
-<para>
- <productname>Destinator</productname> by
- <ulink url="http://www.destinatortechnologies.net">Destinator Technologies</ulink>
- is a software for PNDs, Smartphones and PDAs.
-</para>
-<para>
- <userinput>
- gpsbabel -i destinator_trl -f last_trip.dat -o gpx -F last_trip.gpx
- </userinput>
-</para>
+++ /dev/null
-<para>
- This is the binary file format used by <ulink url="http://www.easygps.com/">EasyGPS</ulink>
- format is seemingly being phased out in favor of GPX in newer versions
- of EasyGPS, but this allows conversions to and from the old binary
- .loc format.
-</para>
-<para>
- Information about and sketchy code to implement this file
- format were provided by Eric Cloninger.
-</para>
-
+++ /dev/null
-<para>
- Input support for the <productname>Energympro</productname> training watches
- file structure.
-</para>
-<para>
-The <ulink url="http://www.energympro.com/product/dsw-gps-sport-watch/">
-Energympro GPS sport watches</ulink> present themselves as USB mass storage
- devices. To get the training just connect the device using the supplied
-USB cable to your computer and the device will show up as a removable device.
-Your training data is in the Workout folder.
-</para>
-<para>
- <userinput>
- gpsbabel -i energympro -f infile.cpo -o gpx,garminextensions -F outfile.gpx
- </userinput>
-</para>
+++ /dev/null
-<para>
- This <ulink url="http://www.mglavionics.co.za/">MGL Avionics</ulink> format holds waypoints or routes. This routes can be loaded by the MGL Stratomaster Enigma EFIS series (
-<productname>Enigma</productname>,
-<productname>Odyssey</productname>,
-<productname>Voyager</productname>,
-<productname>Explorer</productname>).
-</para>
-<para>
- The format is designed for microcontrollers. The use is free for any non-military
- application. You can find a detailed description in the <ulink url="http://www.mglavionics.co.za/Docs/Enigma%20Waypoint%20format.pdf">MGL Documentation</ulink>.
-</para>
+++ /dev/null
-<para>
-
-This format is for the .map files produced by the F90G automobile
-Digital Video Recorder (DVR) when recording videos. The files are
-found on the sd card in /DCIM/DCIMA/NORMAL/ and are named with a time
-stamp and the .map extension. This format records each track point's
-latitude, longitude, local time, GMT time and velocity in Kilometers
-Per Hour. The local time is used in the gpsbabel translation.
-Minutes, seconds and the velocity are combined to form each track point's
-name in the converted trace.
-</para>
-<para>
-This was implemented by analyzing data from a F90G DVR supplied from China.
-Firmware F20-2013121217-E
-</para>
-<para>
-The format was tested only using .map samples collected in the USA. We are
-interested in samples or test results from other hemispheres.
-</para>
+++ /dev/null
-<para>
-This is the format used by the <ulink url="http://www.flysight.ca">FlySight GPS</ulink> for wingsuit pilots.
-</para>
-<para>
-Interfacing with the FlySight is pretty simple. FlySight acts like a USB disk when connected to a computer. Files are organized into folders by date, and individual files within the folder are named according to the time the log started (UTC). The files themselves are CSV text supported by this format.
-</para>
+++ /dev/null
-
-
-
- <para> This was a requested <link linkend="fmt_csv">CSV format</link>, and is <emphasis>not</emphasis> the proprietary
-binary format used by <ulink url="http://www.fugawi.com">Fugawi</ulink>. Like any other CSV format, GPSBabel
-cannot read tracks in this format, but converting a track into it and
-then importing as track in Fugawi works.</para>
- <para> It is known to work with Fugawi V3.1.4.635. When
-importing/exporting waypoints, one has to specify the order of fields
-as follows (names of fields may depend on the language used by
-Fugawi):</para>
- <simplelist type="vert">
- <member> - Name</member>
- <member> - Comment</member>
- <member> - Description</member>
- <member> - Latidude</member>
- <member> - Longitude</member>
- <member> - Altitude (meters)</member>
- <member> - Date (yyyymmdd/yymmdd)</member>
- <member> - Time of day (hhmmss)</member>
- </simplelist>
- <para> When importing tracks, use "[ignore]" instead of "Name",
-"Comment" and "Description".</para>
- <para>
- <ulink url="http://www.fugawi.com/">http://www.fugawi.com/</ulink>
- </para>
-